Commit 45701c29 authored by Michael Thiessen's avatar Michael Thiessen Committed by Commit Bot

Clean up clipboard state in EditUrlSuggestionUnitTest

EditUrlSuggestionUnitTest was leaking native clipboard state that was
causing other clipboard tests to fail. Test grouping on M vs R revealed
this dependency locally, but not on the bots.

Change-Id: I98bed04aae3fa69dc82bb7a74856c37d75b6106a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2353389Reviewed-by: default avatarYaron Friedman <yfriedman@chromium.org>
Commit-Queue: Michael Thiessen <mthiesse@chromium.org>
Cr-Commit-Position: refs/heads/master@{#797482}
parent 4ddec856
......@@ -1148,6 +1148,7 @@ android_library("chrome_test_java") {
"//third_party/junit",
"//third_party/mockito:mockito_java",
"//third_party/ub-uiautomator:ub_uiautomator_java",
"//ui/android:clipboard_java_test_support",
"//ui/android:ui_java",
"//ui/android:ui_java_test_support",
"//ui/android:ui_javatests",
......
......@@ -49,6 +49,7 @@ import org.chromium.components.search_engines.TemplateUrlService;
import org.chromium.content_public.browser.test.NativeLibraryTestUtils;
import org.chromium.content_public.browser.test.util.TestThreadUtils;
import org.chromium.ui.base.Clipboard;
import org.chromium.ui.base.ClipboardAndroidTestSupport;
import org.chromium.ui.modelutil.PropertyModel;
import org.chromium.url.GURL;
......@@ -156,6 +157,7 @@ public final class EditUrlSuggestionUnitTest {
TestThreadUtils.runOnUiThreadBlocking(() -> {
Clipboard.getInstance().overrideClipboardManagerForTesting(mOldClipboardManager);
});
ClipboardAndroidTestSupport.cleanup();
}
/** Test that the suggestion is triggered. */
......
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