Chromium Code Reviews| 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.graphics.Bitmap; | 9 import android.graphics.Bitmap; |
| 10 import android.os.Build; | 10 import android.os.Build; |
| (...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 374 * | 374 * |
| 375 * Test cases can provide subclass instances to the createAwTest* methods in order to create an | 375 * Test cases can provide subclass instances to the createAwTest* methods in order to create an |
| 376 * AwContents instance with injected test dependencies. | 376 * AwContents instance with injected test dependencies. |
| 377 */ | 377 */ |
| 378 public static class TestDependencyFactory extends AwContents.DependencyFacto ry { | 378 public static class TestDependencyFactory extends AwContents.DependencyFacto ry { |
| 379 public AwTestContainerView createAwTestContainerView(AwTestRunnerActivit y activity, | 379 public AwTestContainerView createAwTestContainerView(AwTestRunnerActivit y activity, |
| 380 boolean allowHardwareAcceleration) { | 380 boolean allowHardwareAcceleration) { |
| 381 return new AwTestContainerView(activity, allowHardwareAcceleration); | 381 return new AwTestContainerView(activity, allowHardwareAcceleration); |
| 382 } | 382 } |
| 383 public AwSettings createAwSettings(Context context, boolean supportsLega cyQuirks) { | 383 public AwSettings createAwSettings(Context context, boolean supportsLega cyQuirks) { |
| 384 return new AwSettings(context, false, supportsLegacyQuirks); | 384 return new AwSettings(context, false /* isAccessFromFileURLsGrantedB yDefault */, |
| 385 supportsLegacyQuirks, false /* allowEmptyDocumentPersistence */); | |
|
sgurun-gerrit only
2016/04/05 18:24:15
does any aw test expect this to be true? we will s
boliu
2016/04/05 21:42:05
Obivously not, since tests are green without this
| |
| 385 } | 386 } |
| 386 } | 387 } |
| 387 | 388 |
| 388 protected TestDependencyFactory createTestDependencyFactory() { | 389 protected TestDependencyFactory createTestDependencyFactory() { |
| 389 return new TestDependencyFactory(); | 390 return new TestDependencyFactory(); |
| 390 } | 391 } |
| 391 | 392 |
| 392 public AwTestContainerView createAwTestContainerView( | 393 public AwTestContainerView createAwTestContainerView( |
| 393 final AwContentsClient awContentsClient) { | 394 final AwContentsClient awContentsClient) { |
| 394 return createAwTestContainerView(awContentsClient, false); | 395 return createAwTestContainerView(awContentsClient, false); |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 652 } | 653 } |
| 653 }); | 654 }); |
| 654 | 655 |
| 655 OnPageFinishedHelper onPageFinishedHelper = popupContentsClient.getOnPag eFinishedHelper(); | 656 OnPageFinishedHelper onPageFinishedHelper = popupContentsClient.getOnPag eFinishedHelper(); |
| 656 int callCount = onPageFinishedHelper.getCallCount(); | 657 int callCount = onPageFinishedHelper.getCallCount(); |
| 657 onPageFinishedHelper.waitForCallback(callCount, 1, WAIT_TIMEOUT_MS, Time Unit.MILLISECONDS); | 658 onPageFinishedHelper.waitForCallback(callCount, 1, WAIT_TIMEOUT_MS, Time Unit.MILLISECONDS); |
| 658 | 659 |
| 659 return new PopupInfo(popupContentsClient, popupContainerView, popupConte nts); | 660 return new PopupInfo(popupContentsClient, popupContainerView, popupConte nts); |
| 660 } | 661 } |
| 661 } | 662 } |
| OLD | NEW |