OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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.content.browser; | 5 package org.chromium.content.browser; |
6 | 6 |
7 import org.chromium.base.ThreadUtils; | 7 import org.chromium.base.ThreadUtils; |
8 import org.chromium.base.test.util.DisabledTest; | 8 import org.chromium.base.test.util.DisabledTest; |
9 import org.chromium.base.test.util.UrlUtils; | 9 import org.chromium.base.test.util.UrlUtils; |
10 import org.chromium.content.browser.test.util.CallbackHelper; | 10 import org.chromium.content.browser.test.util.CallbackHelper; |
11 import org.chromium.content_public.browser.LoadUrlParams; | 11 import org.chromium.content_public.browser.LoadUrlParams; |
12 import org.chromium.content_public.browser.WebContents; | 12 import org.chromium.content_public.browser.WebContents; |
| 13 import org.chromium.content_public.browser.WebContentsObserver; |
13 import org.chromium.content_shell_apk.ContentShellActivity; | 14 import org.chromium.content_shell_apk.ContentShellActivity; |
14 import org.chromium.content_shell_apk.ContentShellTestBase; | 15 import org.chromium.content_shell_apk.ContentShellTestBase; |
15 | 16 |
16 import java.util.concurrent.Callable; | 17 import java.util.concurrent.Callable; |
17 | 18 |
18 /** | 19 /** |
19 * Tests for the WebContentsObserver APIs. | 20 * Tests for the WebContentsObserver APIs. |
20 */ | 21 */ |
21 public class WebContentsObserverAndroidTest extends ContentShellTestBase { | 22 public class WebContentsObserverAndroidTest extends ContentShellTestBase { |
22 private static final String URL = UrlUtils.encodeHtmlDataUri( | 23 private static final String URL = UrlUtils.encodeHtmlDataUri( |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 getInstrumentation().runOnMainSync(new Runnable() { | 67 getInstrumentation().runOnMainSync(new Runnable() { |
67 @Override | 68 @Override |
68 public void run() { | 69 public void run() { |
69 getContentViewCore().getWebContents().getNavigationController() | 70 getContentViewCore().getWebContents().getNavigationController() |
70 .loadUrl(new LoadUrlParams(URL)); | 71 .loadUrl(new LoadUrlParams(URL)); |
71 } | 72 } |
72 }); | 73 }); |
73 observer.getDidFirstVisuallyNonEmptyPaintCallbackHelper().waitForCallbac
k(callCount); | 74 observer.getDidFirstVisuallyNonEmptyPaintCallbackHelper().waitForCallbac
k(callCount); |
74 } | 75 } |
75 } | 76 } |
OLD | NEW |