Index: android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java |
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java b/android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java |
index 69a2c50a97af54050d3490f4b7979c14209cb5de..293f1432de71dd5d24602ca8c3d1c56f434f0dd8 100644 |
--- a/android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java |
+++ b/android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java |
@@ -200,27 +200,28 @@ public class AwTestBase |
public AwLayoutSizer createLayoutSizer() { |
return new AwLayoutSizer(); |
} |
+ public AwTestContainerView createAwTestContainerView(AwTestRunnerActivity activity) { |
+ return new AwTestContainerView(activity); |
+ } |
} |
- protected AwTestContainerView createAwTestContainerView( |
- final AwContentsClient awContentsClient) { |
- return createAwTestContainerView(awContentsClient, new TestDependencyFactory()); |
+ protected TestDependencyFactory createTestDependencyFactory() { |
+ return new TestDependencyFactory(); |
} |
protected AwTestContainerView createAwTestContainerView( |
- final AwContentsClient awContentsClient, |
- final TestDependencyFactory testDependencyFactory) { |
- AwTestContainerView testContainerView = |
- createDetachedAwTestContainerView(awContentsClient, testDependencyFactory); |
+ final AwContentsClient awContentsClient) { |
+ AwTestContainerView testContainerView = createDetachedAwTestContainerView(awContentsClient); |
getActivity().addView(testContainerView); |
testContainerView.requestFocus(); |
return testContainerView; |
} |
protected AwTestContainerView createDetachedAwTestContainerView( |
- final AwContentsClient awContentsClient, |
- final TestDependencyFactory testDependencyFactory) { |
- final AwTestContainerView testContainerView = new AwTestContainerView(getActivity()); |
+ final AwContentsClient awContentsClient) { |
+ final TestDependencyFactory testDependencyFactory = createTestDependencyFactory(); |
+ final AwTestContainerView testContainerView = |
+ testDependencyFactory.createAwTestContainerView(getActivity()); |
testContainerView.initialize(new AwContents( |
new AwBrowserContext(new InMemorySharedPreferences()), |
testContainerView, testContainerView.getInternalAccessDelegate(), |
@@ -230,12 +231,6 @@ public class AwTestBase |
protected AwTestContainerView createAwTestContainerViewOnMainSync( |
final AwContentsClient client) throws Exception { |
- return createAwTestContainerViewOnMainSync(client, new TestDependencyFactory()); |
- } |
- |
- protected AwTestContainerView createAwTestContainerViewOnMainSync( |
- final AwContentsClient client, |
- final TestDependencyFactory testDependencyFactory) throws Exception { |
final AtomicReference<AwTestContainerView> testContainerView = |
new AtomicReference<AwTestContainerView>(); |
getInstrumentation().runOnMainSync(new Runnable() { |