Commit 6c7d9f5a authored by Jinsuk Kim's avatar Jinsuk Kim Committed by Commit Bot

Remove unnecessary dep injection in test

PopupZoomerTest doesn't need a test ImeAdapter and
InputMethodManagerWrapper instance in CVC for its tests to pass.
Previously the tests needed a mock instance to avoid NPE,
but CVC was refactored not to require it. This CL deletes the code
setting the test instance to CVC.

Change-Id: I602f475e2b0e5e76883f980564e7e137b185c823
Reviewed-on: https://chromium-review.googlesource.com/894964Reviewed-by: default avatarBo <boliu@chromium.org>
Reviewed-by: default avatarChangwan Ryu <changwan@chromium.org>
Commit-Queue: Jinsuk Kim <jinsukkim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533219}
parent f66d3495
......@@ -24,9 +24,7 @@ import org.junit.runner.RunWith;
import org.chromium.base.ThreadUtils;
import org.chromium.base.test.util.Feature;
import org.chromium.content.browser.test.ContentJUnit4ClassRunner;
import org.chromium.content.browser.test.util.TestInputMethodManagerWrapper;
import org.chromium.content.browser.webcontents.WebContentsImpl;
import org.chromium.content_public.browser.ImeAdapter;
import org.chromium.content_public.browser.WebContents;
import org.chromium.content_shell_apk.ContentShellActivityTestRule;
......@@ -100,12 +98,8 @@ public class PopupZoomerTest {
WebContents webContents = mActivityTestRule.getContentViewCore().getWebContents();
mContentViewCore = (ContentViewCoreImpl) ContentViewCore.create(context, "");
mContentViewCore.setWebContentsForTesting((WebContentsImpl) webContents);
ViewGroup containerView = mActivityTestRule.getContentViewCore().getContainerView();
ImeAdapter imeAdapter = ImeAdapter.fromWebContents(webContents);
imeAdapter.setInputMethodManagerWrapperForTest(
TestInputMethodManagerWrapper.create(imeAdapter));
mPopupZoomer = createPopupZoomerForTest(
InstrumentationRegistry.getTargetContext(), containerView);
mPopupZoomer = createPopupZoomerForTest(InstrumentationRegistry.getTargetContext(),
mActivityTestRule.getContentViewCore().getContainerView());
TapDisambiguator.fromWebContents(webContents).setPopupZoomerForTest(mPopupZoomer);
}
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment