Commit 924e43f8 authored by Clark DuVall's avatar Clark DuVall Committed by Commit Bot

[WebLayer] Attempt to fix flakes in Geolocation tests

The geolocation permission was getting automatically denied on some test
runs. This should verify if it is because the prefs are getting
persisted across test runs.

Bug: 1064500
Change-Id: I385bb1326efa51c7885181a0f2557c8081bc313a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2132669
Commit-Queue: Clark DuVall <cduvall@chromium.org>
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Auto-Submit: Clark DuVall <cduvall@chromium.org>
Reviewed-by: default avatarJohn Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#755395}
parent 27477af7
......@@ -5,6 +5,7 @@
package org.chromium.weblayer.test;
import android.net.Uri;
import android.os.Bundle;
import android.support.test.filters.MediumTest;
import org.junit.After;
......@@ -66,7 +67,11 @@ public final class GeolocationTest {
@Before
public void setUp() throws Throwable {
mActivity = mActivityTestRule.launchShellWithUrl("about:blank");
Bundle extras = new Bundle();
// TODO(crbug.com/1064500): If this prevents flakes figure out why preferences are getting
// persisted across test runs for non-incognito profiles.
extras.putString(InstrumentationActivity.EXTRA_PROFILE_NAME, null);
mActivity = mActivityTestRule.launchShellWithUrl("about:blank", extras);
Assert.assertNotNull(mActivity);
mTestWebLayer = TestWebLayer.getTestWebLayer(mActivity.getApplicationContext());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment