OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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.MediumTest; | 7 import android.test.suitebuilder.annotation.MediumTest; |
8 | 8 |
9 import org.chromium.base.test.util.Feature; | 9 import org.chromium.base.test.util.Feature; |
10 import org.chromium.content.browser.test.util.Criteria; | 10 import org.chromium.content.browser.test.util.Criteria; |
11 import org.chromium.content.browser.test.util.CriteriaHelper; | 11 import org.chromium.content.browser.test.util.CriteriaHelper; |
12 import org.chromium.content.browser.test.util.MockLocationProvider; | |
13 import org.chromium.content.browser.test.util.TestCallbackHelperContainer; | 12 import org.chromium.content.browser.test.util.TestCallbackHelperContainer; |
14 import org.chromium.content.browser.test.util.TestCallbackHelperContainer.OnEval
uateJavaScriptResultHelper; | 13 import org.chromium.content.browser.test.util.TestCallbackHelperContainer.OnEval
uateJavaScriptResultHelper; |
15 import org.chromium.content_public.browser.LoadUrlParams; | 14 import org.chromium.content_public.browser.LoadUrlParams; |
16 import org.chromium.content_shell_apk.ContentShellTestBase; | 15 import org.chromium.content_shell_apk.ContentShellTestBase; |
| 16 import org.chromium.device.geolocation.LocationProviderFactory; |
| 17 import org.chromium.device.geolocation.MockLocationProvider; |
17 | 18 |
18 import java.util.concurrent.Callable; | 19 import java.util.concurrent.Callable; |
19 | 20 |
20 /** | 21 /** |
21 * Test suite for ensureing that Geolocation interacts as expected | 22 * Test suite for ensureing that Geolocation interacts as expected |
22 * with ContentView APIs - e.g. that it's started and stopped as the | 23 * with ContentView APIs - e.g. that it's started and stopped as the |
23 * ContentView is hidden or shown. | 24 * ContentView is hidden or shown. |
24 */ | 25 */ |
25 public class ContentViewLocationTest extends ContentShellTestBase { | 26 public class ContentViewLocationTest extends ContentShellTestBase { |
26 | 27 |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 hideContentViewOnUiThread(); | 171 hideContentViewOnUiThread(); |
171 startGeolocationWatchPosition(); | 172 startGeolocationWatchPosition(); |
172 ensureGeolocationRunning(false); | 173 ensureGeolocationRunning(false); |
173 | 174 |
174 loadUrl(getContentViewCore().getWebContents().getNavigationController(), | 175 loadUrl(getContentViewCore().getWebContents().getNavigationController(), |
175 mTestCallbackHelperContainer, new LoadUrlParams("about:blank")); | 176 mTestCallbackHelperContainer, new LoadUrlParams("about:blank")); |
176 showContentViewOnUiThread(); | 177 showContentViewOnUiThread(); |
177 ensureGeolocationRunning(false); | 178 ensureGeolocationRunning(false); |
178 } | 179 } |
179 } | 180 } |
OLD | NEW |