| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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.android_webview.test; | 5 package org.chromium.android_webview.test; |
| 6 | 6 |
| 7 import android.test.suitebuilder.annotation.SmallTest; | 7 import android.test.suitebuilder.annotation.SmallTest; |
| 8 import android.util.Pair; | 8 import android.util.Pair; |
| 9 | 9 |
| 10 import org.chromium.android_webview.AwContents; | 10 import org.chromium.android_webview.AwContents; |
| 11 import org.chromium.android_webview.test.util.CommonResources; | 11 import org.chromium.android_webview.test.util.CommonResources; |
| 12 import org.chromium.android_webview.test.util.JSUtils; | 12 import org.chromium.android_webview.test.util.JSUtils; |
| 13 import org.chromium.base.test.util.Feature; | 13 import org.chromium.base.test.util.Feature; |
| 14 import org.chromium.content.browser.LoadUrlParams; | |
| 15 import org.chromium.content.browser.test.util.CallbackHelper; | 14 import org.chromium.content.browser.test.util.CallbackHelper; |
| 16 import org.chromium.content.browser.test.util.TestCallbackHelperContainer.OnPage
StartedHelper; | 15 import org.chromium.content.browser.test.util.TestCallbackHelperContainer.OnPage
StartedHelper; |
| 17 import org.chromium.content.browser.test.util.TestCallbackHelperContainer.OnRece
ivedErrorHelper; | 16 import org.chromium.content.browser.test.util.TestCallbackHelperContainer.OnRece
ivedErrorHelper; |
| 17 import org.chromium.content_public.browser.LoadUrlParams; |
| 18 import org.chromium.net.test.util.TestWebServer; | 18 import org.chromium.net.test.util.TestWebServer; |
| 19 | 19 |
| 20 import java.util.ArrayList; | 20 import java.util.ArrayList; |
| 21 import java.util.List; | 21 import java.util.List; |
| 22 import java.util.concurrent.Callable; | 22 import java.util.concurrent.Callable; |
| 23 import java.util.concurrent.TimeUnit; | 23 import java.util.concurrent.TimeUnit; |
| 24 | 24 |
| 25 /** | 25 /** |
| 26 * Tests for the WebViewClient.shouldOverrideUrlLoading() method. | 26 * Tests for the WebViewClient.shouldOverrideUrlLoading() method. |
| 27 */ | 27 */ |
| (...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 810 false)); | 810 false)); |
| 811 awContents.loadUrl(new LoadUrlParams(jsUrl)); | 811 awContents.loadUrl(new LoadUrlParams(jsUrl)); |
| 812 } | 812 } |
| 813 }); | 813 }); |
| 814 contentsClient.getOnPageFinishedHelper().waitForCallback(currentCallCoun
t, 1, | 814 contentsClient.getOnPageFinishedHelper().waitForCallback(currentCallCoun
t, 1, |
| 815 WAIT_TIMEOUT_MS, TimeUnit.MILLISECONDS); | 815 WAIT_TIMEOUT_MS, TimeUnit.MILLISECONDS); |
| 816 | 816 |
| 817 assertEquals(0, shouldOverrideUrlLoadingHelper.getCallCount()); | 817 assertEquals(0, shouldOverrideUrlLoadingHelper.getCallCount()); |
| 818 } | 818 } |
| 819 } | 819 } |
| OLD | NEW |