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.android_webview.test; | 5 package org.chromium.android_webview.test; |
6 | 6 |
7 import android.content.Context; | 7 import android.content.Context; |
8 import android.support.test.filters.MediumTest; | 8 import android.support.test.filters.MediumTest; |
9 import android.support.test.filters.SmallTest; | 9 import android.support.test.filters.SmallTest; |
10 import android.webkit.GeolocationPermissions; | 10 import android.webkit.GeolocationPermissions; |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 private static class GeolocationOnInsecureOriginsTestDependencyFactory | 128 private static class GeolocationOnInsecureOriginsTestDependencyFactory |
129 extends TestDependencyFactory { | 129 extends TestDependencyFactory { |
130 private boolean mAllow; | 130 private boolean mAllow; |
131 public GeolocationOnInsecureOriginsTestDependencyFactory(boolean allow)
{ | 131 public GeolocationOnInsecureOriginsTestDependencyFactory(boolean allow)
{ |
132 mAllow = allow; | 132 mAllow = allow; |
133 } | 133 } |
134 | 134 |
135 @Override | 135 @Override |
136 public AwSettings createAwSettings(Context context, boolean supportLegac
yQuirks) { | 136 public AwSettings createAwSettings(Context context, boolean supportLegac
yQuirks) { |
137 return new AwSettings(context, false /* isAccessFromFileURLsGrantedB
yDefault */, | 137 return new AwSettings(context, false /* isAccessFromFileURLsGrantedB
yDefault */, |
138 supportLegacyQuirks, false /* allowEmptyDocumentPersistence
*/, mAllow); | 138 supportLegacyQuirks, false /* allowEmptyDocumentPersistence
*/, mAllow, |
| 139 false /* doNotUpdateSelectionOnMutatingSelectionRange */); |
139 } | 140 } |
140 } | 141 } |
141 | 142 |
142 /** | 143 /** |
143 * Ensure that a call to navigator.getCurrentPosition works in WebView. | 144 * Ensure that a call to navigator.getCurrentPosition works in WebView. |
144 */ | 145 */ |
145 @MediumTest | 146 @MediumTest |
146 @Feature({"AndroidWebView"}) | 147 @Feature({"AndroidWebView"}) |
147 public void testGetPosition() throws Throwable { | 148 public void testGetPosition() throws Throwable { |
148 initAwContents(new GrantPermisionAwContentClient()); | 149 initAwContents(new GrantPermisionAwContentClient()); |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 | 355 |
355 pollInstrumentationThread(new Callable<Boolean>() { | 356 pollInstrumentationThread(new Callable<Boolean>() { |
356 @Override | 357 @Override |
357 public Boolean call() throws Exception { | 358 public Boolean call() throws Exception { |
358 return getPositionCountFromJS() > 0; | 359 return getPositionCountFromJS() > 0; |
359 } | 360 } |
360 }); | 361 }); |
361 } | 362 } |
362 | 363 |
363 } | 364 } |
OLD | NEW |