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 52957e0ec45216e499d5aadfcbbada2e0a12d032..da078d272d627c0c21a1251d5fd84c1e7ccf98f1 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,18 +200,18 @@ 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; |
@@ -222,9 +222,10 @@ public class AwTestBase |
new AwBrowserContext(new InMemorySharedPreferences()); |
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( |
mBrowserContext, testContainerView, testContainerView.getInternalAccessDelegate(), |
awContentsClient, false, testDependencyFactory.createLayoutSizer())); |
@@ -233,12 +234,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() { |