Commit e240c0e8 authored by Arthur Sonzogni's avatar Arthur Sonzogni Committed by Commit Bot

Revert "[Autofill Assistant] Added test for image resource identifiers"

This reverts commit dc2ffb3b.

Reason for revert: Failing on several bots.
See https://crbug.com/1108344

Original change's description:
> [Autofill Assistant] Added test for image resource identifiers
> 
> We used to have a test like this, but it was disabled some time ago due
> to hard-to-reproduce issues on devices with older API levels. This is
> a more focused test specifically for vector graphics. I have tried this
> on a variety of (emulated) devices and API levels and could not
> reproduce, so I'm going ahead and submit this test.
> 
> Tested on:
> - Generic phone 21
> - Nexus 5x 23
> - Nexus 5x 25
> - Nexus 5x 26
> - Pixel 3 XL 28
> - Pixel 3 30
> 
> Bug: b/145043394
> Change-Id: I6d27eeda3e2ef7c2e29d5364838349664a83eb49
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2310991
> Commit-Queue: Marian Fechete <marianfe@google.com>
> Reviewed-by: Marian Fechete <marianfe@google.com>
> Auto-Submit: Clemens Arbesser <arbesser@google.com>
> Cr-Commit-Position: refs/heads/master@{#790785}

TBR=arbesser@google.com,marianfe@google.com

Change-Id: Ibb4d1ef13a9368356d9e472bb3919ca69e07b78a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: b/145043394
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2312641Reviewed-by: default avatarArthur Sonzogni <arthursonzogni@chromium.org>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#790838}
parent 63147b70
...@@ -65,7 +65,6 @@ import org.junit.runner.RunWith; ...@@ -65,7 +65,6 @@ import org.junit.runner.RunWith;
import org.chromium.base.test.util.CommandLineFlags; import org.chromium.base.test.util.CommandLineFlags;
import org.chromium.base.test.util.DisableIf; import org.chromium.base.test.util.DisableIf;
import org.chromium.base.test.util.DisabledTest; import org.chromium.base.test.util.DisabledTest;
import org.chromium.base.test.util.MinAndroidSdkLevel;
import org.chromium.chrome.autofill_assistant.R; import org.chromium.chrome.autofill_assistant.R;
import org.chromium.chrome.browser.autofill_assistant.generic_ui.AssistantDimension; import org.chromium.chrome.browser.autofill_assistant.generic_ui.AssistantDimension;
import org.chromium.chrome.browser.autofill_assistant.proto.ActionProto; import org.chromium.chrome.browser.autofill_assistant.proto.ActionProto;
...@@ -3313,65 +3312,4 @@ public class AutofillAssistantGenericUiTest { ...@@ -3313,65 +3312,4 @@ public class AutofillAssistantGenericUiTest {
CreditCardResponseProto.newBuilder().setNetwork("amex"))) CreditCardResponseProto.newBuilder().setNetwork("amex")))
.build())); .build()));
} }
}
@Test
@MediumTest
@MinAndroidSdkLevel(21)
public void testImageResourceIdentifier() {
ViewProto imageView =
(ViewProto) ViewProto.newBuilder()
.setLayoutParams(
ViewLayoutParamsProto.newBuilder()
.setLayoutWidth(24)
.setLayoutHeight(24)
.setLayoutGravity(
ViewLayoutParamsProto.Gravity.CENTER_VALUE))
.setAttributes(ViewAttributesProto.newBuilder().setContentDescription(
"test image"))
.setImageView(ImageViewProto.newBuilder().setImage(
DrawableProto.newBuilder().setResourceIdentifier(
"ic_visibility_black")))
.build();
GenericUserInterfaceProto genericUserInterface =
(GenericUserInterfaceProto) GenericUserInterfaceProto.newBuilder()
.setRootView(
ViewProto.newBuilder()
.setLayoutParams(
ViewLayoutParamsProto.newBuilder()
.setLayoutWidth(ViewLayoutParamsProto.Size
.MATCH_PARENT_VALUE)
.setLayoutHeight(
ViewLayoutParamsProto.Size
.WRAP_CONTENT_VALUE))
.setViewContainer(
ViewContainerProto.newBuilder()
.setLinearLayout(
LinearLayoutProto.newBuilder()
.setOrientation(
LinearLayoutProto
.Orientation
.VERTICAL))
.addViews(imageView)))
.build();
ArrayList<ActionProto> list = new ArrayList<>();
list.add((ActionProto) ActionProto.newBuilder()
.setShowGenericUi(ShowGenericUiProto.newBuilder().setGenericUserInterface(
genericUserInterface))
.build());
AutofillAssistantTestScript script = new AutofillAssistantTestScript(
(SupportedScriptProto) SupportedScriptProto.newBuilder()
.setPath("autofill_assistant_target_website.html")
.setPresentation(PresentationProto.newBuilder().setAutostart(true).setChip(
ChipProto.newBuilder().setText("Autostart")))
.build(),
list);
AutofillAssistantTestService testService =
new AutofillAssistantTestService(Collections.singletonList(script));
startAutofillAssistant(mTestRule.getActivity(), testService);
waitUntilViewMatchesCondition(withContentDescription("test image"), isDisplayed());
}
}
\ No newline at end of file
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