| 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.app.Instrumentation; | 7 import android.app.Instrumentation; |
| 8 import android.content.Context; | 8 import android.content.Context; |
| 9 import android.test.ActivityInstrumentationTestCase2; | 9 import android.test.ActivityInstrumentationTestCase2; |
| 10 import android.util.Log; | 10 import android.util.Log; |
| 11 | 11 |
| 12 import static org.chromium.base.test.util.ScalableTimeout.scaleTimeout; | 12 import static org.chromium.base.test.util.ScalableTimeout.scaleTimeout; |
| 13 | 13 |
| 14 import org.chromium.android_webview.AwBrowserContext; | 14 import org.chromium.android_webview.AwBrowserContext; |
| 15 import org.chromium.android_webview.AwBrowserProcess; | 15 import org.chromium.android_webview.AwBrowserProcess; |
| 16 import org.chromium.android_webview.AwContents; | 16 import org.chromium.android_webview.AwContents; |
| 17 import org.chromium.android_webview.AwContentsClient; | 17 import org.chromium.android_webview.AwContentsClient; |
| 18 import org.chromium.android_webview.AwSettings; | 18 import org.chromium.android_webview.AwSettings; |
| 19 import org.chromium.android_webview.test.util.JSUtils; | 19 import org.chromium.android_webview.test.util.JSUtils; |
| 20 import org.chromium.base.test.util.InMemorySharedPreferences; | 20 import org.chromium.base.test.util.InMemorySharedPreferences; |
| 21 import org.chromium.content.browser.ContentSettings; | 21 import org.chromium.content.browser.ContentSettings; |
| 22 import org.chromium.content.browser.LoadUrlParams; | |
| 23 import org.chromium.content.browser.test.util.CallbackHelper; | 22 import org.chromium.content.browser.test.util.CallbackHelper; |
| 24 import org.chromium.content.browser.test.util.Criteria; | 23 import org.chromium.content.browser.test.util.Criteria; |
| 25 import org.chromium.content.browser.test.util.CriteriaHelper; | 24 import org.chromium.content.browser.test.util.CriteriaHelper; |
| 25 import org.chromium.content_public.browser.LoadUrlParams; |
| 26 | 26 |
| 27 import java.util.Map; | 27 import java.util.Map; |
| 28 import java.util.concurrent.Callable; | 28 import java.util.concurrent.Callable; |
| 29 import java.util.concurrent.FutureTask; | 29 import java.util.concurrent.FutureTask; |
| 30 import java.util.concurrent.TimeUnit; | 30 import java.util.concurrent.TimeUnit; |
| 31 import java.util.concurrent.atomic.AtomicReference; | 31 import java.util.concurrent.atomic.AtomicReference; |
| 32 | 32 |
| 33 /** | 33 /** |
| 34 * A base class for android_webview tests. | 34 * A base class for android_webview tests. |
| 35 */ | 35 */ |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 public boolean canZoomOutOnUiThread(final AwContents awContents) throws Exce
ption { | 478 public boolean canZoomOutOnUiThread(final AwContents awContents) throws Exce
ption { |
| 479 return runTestOnUiThreadAndGetResult(new Callable<Boolean>() { | 479 return runTestOnUiThreadAndGetResult(new Callable<Boolean>() { |
| 480 @Override | 480 @Override |
| 481 public Boolean call() throws Exception { | 481 public Boolean call() throws Exception { |
| 482 return awContents.canZoomOut(); | 482 return awContents.canZoomOut(); |
| 483 } | 483 } |
| 484 }); | 484 }); |
| 485 } | 485 } |
| 486 | 486 |
| 487 } | 487 } |
| OLD | NEW |