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 android.test.suitebuilder.annotation.SmallTest; | 7 import android.test.suitebuilder.annotation.SmallTest; |
8 | 8 |
9 import org.chromium.base.ThreadUtils; | 9 import org.chromium.base.ThreadUtils; |
10 import org.chromium.base.test.util.Feature; | 10 import org.chromium.base.test.util.Feature; |
11 import org.chromium.base.test.util.UrlUtils; | 11 import org.chromium.base.test.util.UrlUtils; |
12 import org.chromium.content.browser.test.util.CallbackHelper; | 12 import org.chromium.content.browser.test.util.CallbackHelper; |
| 13 import org.chromium.content_public.browser.LoadUrlParams; |
13 import org.chromium.content_public.browser.WebContents; | 14 import org.chromium.content_public.browser.WebContents; |
14 import org.chromium.content_shell_apk.ContentShellActivity; | 15 import org.chromium.content_shell_apk.ContentShellActivity; |
15 import org.chromium.content_shell_apk.ContentShellTestBase; | 16 import org.chromium.content_shell_apk.ContentShellTestBase; |
16 | 17 |
17 import java.util.concurrent.Callable; | 18 import java.util.concurrent.Callable; |
18 | 19 |
19 /** | 20 /** |
20 * Tests for the WebContentsObserverAndroid APIs. | 21 * Tests for the WebContentsObserverAndroid APIs. |
21 */ | 22 */ |
22 public class WebContentsObserverAndroidTest extends ContentShellTestBase { | 23 public class WebContentsObserverAndroidTest extends ContentShellTestBase { |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 int callCount = observer.getDidFirstVisuallyNonEmptyPaintCallbackHelper(
).getCallCount(); | 64 int callCount = observer.getDidFirstVisuallyNonEmptyPaintCallbackHelper(
).getCallCount(); |
64 getInstrumentation().runOnMainSync(new Runnable() { | 65 getInstrumentation().runOnMainSync(new Runnable() { |
65 @Override | 66 @Override |
66 public void run() { | 67 public void run() { |
67 getContentViewCore().loadUrl(new LoadUrlParams(URL)); | 68 getContentViewCore().loadUrl(new LoadUrlParams(URL)); |
68 } | 69 } |
69 }); | 70 }); |
70 observer.getDidFirstVisuallyNonEmptyPaintCallbackHelper().waitForCallbac
k(callCount); | 71 observer.getDidFirstVisuallyNonEmptyPaintCallbackHelper().waitForCallbac
k(callCount); |
71 } | 72 } |
72 } | 73 } |
OLD | NEW |