Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1162)

Side by Side Diff: chrome/android/javatests/src/org/chromium/chrome/browser/infobar/SearchGeolocationDisclosureInfoBarTest.java

Issue 2809733003: Move most of FrameLoader::CheckCompleted() to Document (Closed)
Patch Set: Fix failing android test Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-reload-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.infobar; 5 package org.chromium.chrome.browser.infobar;
6 6
7 import android.support.test.filters.SmallTest; 7 import android.support.test.filters.SmallTest;
8 8
9 import org.chromium.base.metrics.RecordHistogram; 9 import org.chromium.base.metrics.RecordHistogram;
10 import org.chromium.base.test.util.CommandLineFlags; 10 import org.chromium.base.test.util.CommandLineFlags;
11 import org.chromium.base.test.util.Feature; 11 import org.chromium.base.test.util.Feature;
12 import org.chromium.chrome.browser.ChromeActivity; 12 import org.chromium.chrome.browser.ChromeActivity;
13 import org.chromium.chrome.browser.SearchGeolocationDisclosureTabHelper; 13 import org.chromium.chrome.browser.SearchGeolocationDisclosureTabHelper;
14 import org.chromium.chrome.test.ChromeActivityTestCaseBase; 14 import org.chromium.chrome.test.ChromeActivityTestCaseBase;
15 import org.chromium.chrome.test.util.InfoBarTestAnimationListener; 15 import org.chromium.chrome.test.util.InfoBarTestAnimationListener;
16 import org.chromium.chrome.test.util.InfoBarUtil; 16 import org.chromium.chrome.test.util.InfoBarUtil;
17 import org.chromium.net.test.EmbeddedTestServer; 17 import org.chromium.net.test.EmbeddedTestServer;
18 18
19 import java.util.concurrent.TimeoutException; 19 import java.util.concurrent.TimeoutException;
20 20
21 /** Tests for the SearchGeolocationDisclosureInfobar. */ 21 /** Tests for the SearchGeolocationDisclosureInfobar. */
22 public class SearchGeolocationDisclosureInfoBarTest 22 public class SearchGeolocationDisclosureInfoBarTest
23 extends ChromeActivityTestCaseBase<ChromeActivity> { 23 extends ChromeActivityTestCaseBase<ChromeActivity> {
24 private static final String SEARCH_PAGE = "/chrome/test/data/empty.html"; 24 private static final String SEARCH_PAGE = "/chrome/test/data/android/google. html";
25 private static final String ENABLE_NEW_DISCLOSURE_FEATURE = 25 private static final String ENABLE_NEW_DISCLOSURE_FEATURE =
26 "enable-features=ConsistentOmniboxGeolocation"; 26 "enable-features=ConsistentOmniboxGeolocation";
27 private static final String DISABLE_NEW_DISCLOSURE_FEATURE = 27 private static final String DISABLE_NEW_DISCLOSURE_FEATURE =
28 "disable-features=ConsistentOmniboxGeolocation"; 28 "disable-features=ConsistentOmniboxGeolocation";
29 29
30 private EmbeddedTestServer mTestServer; 30 private EmbeddedTestServer mTestServer;
31 31
32 public SearchGeolocationDisclosureInfoBarTest() { 32 public SearchGeolocationDisclosureInfoBarTest() {
33 super(ChromeActivity.class); 33 super(ChromeActivity.class);
34 } 34 }
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 @CommandLineFlags.Add(DISABLE_NEW_DISCLOSURE_FEATURE) 174 @CommandLineFlags.Add(DISABLE_NEW_DISCLOSURE_FEATURE)
175 public void testInfoBarAppearsDoesntAppearWithoutFeature() 175 public void testInfoBarAppearsDoesntAppearWithoutFeature()
176 throws InterruptedException, TimeoutException { 176 throws InterruptedException, TimeoutException {
177 SearchGeolocationDisclosureTabHelper.setIgnoreUrlChecksForTesting(); 177 SearchGeolocationDisclosureTabHelper.setIgnoreUrlChecksForTesting();
178 assertEquals("Wrong starting infobar count", 0, getInfoBars().size()); 178 assertEquals("Wrong starting infobar count", 0, getInfoBars().size());
179 179
180 loadUrl(mTestServer.getURL(SEARCH_PAGE)); 180 loadUrl(mTestServer.getURL(SEARCH_PAGE));
181 assertEquals("Wrong infobar count after search", 0, getInfoBars().size() ); 181 assertEquals("Wrong infobar count after search", 0, getInfoBars().size() );
182 } 182 }
183 } 183 }
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-reload-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698