| 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.content.Context; | 7 import android.content.Context; |
| 8 import android.graphics.Point; | 8 import android.graphics.Point; |
| 9 import android.net.http.SslError; | 9 import android.net.http.SslError; |
| 10 import android.os.Build; | 10 import android.os.Build; |
| (...skipping 2883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2894 private static class EmptyDocumentPeristenceTestDependencyFactory | 2894 private static class EmptyDocumentPeristenceTestDependencyFactory |
| 2895 extends TestDependencyFactory { | 2895 extends TestDependencyFactory { |
| 2896 private boolean mAllow; | 2896 private boolean mAllow; |
| 2897 public EmptyDocumentPeristenceTestDependencyFactory(boolean allow) { | 2897 public EmptyDocumentPeristenceTestDependencyFactory(boolean allow) { |
| 2898 mAllow = allow; | 2898 mAllow = allow; |
| 2899 } | 2899 } |
| 2900 | 2900 |
| 2901 @Override | 2901 @Override |
| 2902 public AwSettings createAwSettings(Context context, boolean supportsLega
cyQuirks) { | 2902 public AwSettings createAwSettings(Context context, boolean supportsLega
cyQuirks) { |
| 2903 return new AwSettings(context, false /* isAccessFromFileURLsGrantedB
yDefault */, | 2903 return new AwSettings(context, false /* isAccessFromFileURLsGrantedB
yDefault */, |
| 2904 supportsLegacyQuirks, mAllow); | 2904 supportsLegacyQuirks, mAllow, true /* allowGeolocationOnInse
cureOrigins */); |
| 2905 } | 2905 } |
| 2906 } | 2906 } |
| 2907 | 2907 |
| 2908 private void doAllowEmptyDocumentPersistenceTest(boolean allow) throws Throw
able { | 2908 private void doAllowEmptyDocumentPersistenceTest(boolean allow) throws Throw
able { |
| 2909 mOverridenFactory = new EmptyDocumentPeristenceTestDependencyFactory(all
ow); | 2909 mOverridenFactory = new EmptyDocumentPeristenceTestDependencyFactory(all
ow); |
| 2910 | 2910 |
| 2911 final TestAwContentsClient client = new TestAwContentsClient(); | 2911 final TestAwContentsClient client = new TestAwContentsClient(); |
| 2912 final AwTestContainerView mContainerView = createAwTestContainerViewOnMa
inSync(client); | 2912 final AwTestContainerView mContainerView = createAwTestContainerViewOnMa
inSync(client); |
| 2913 final AwContents awContents = mContainerView.getAwContents(); | 2913 final AwContents awContents = mContainerView.getAwContents(); |
| 2914 enableJavaScriptOnUiThread(awContents); | 2914 enableJavaScriptOnUiThread(awContents); |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3075 final AwContents awContents = webView.getAwContents(); | 3075 final AwContents awContents = webView.getAwContents(); |
| 3076 runTestOnUiThread(new Runnable() { | 3076 runTestOnUiThread(new Runnable() { |
| 3077 @Override | 3077 @Override |
| 3078 public void run() { | 3078 public void run() { |
| 3079 awContents.getContentViewCore().sendDoubleTapForTest( | 3079 awContents.getContentViewCore().sendDoubleTapForTest( |
| 3080 SystemClock.uptimeMillis(), x, y); | 3080 SystemClock.uptimeMillis(), x, y); |
| 3081 } | 3081 } |
| 3082 }); | 3082 }); |
| 3083 } | 3083 } |
| 3084 } | 3084 } |
| OLD | NEW |