Commit acf78a47 authored by Peter Kotwicz's avatar Peter Kotwicz Committed by Commit Bot

[Android] Remove duplicate resources in browser_ui/modaldialog

This CL:
- Deletes duplicate
components/browser_ui/modaldialog/android/test/java/res/drawable/ic_add.xml
to remove conflict with chrome/android/java/res/drawable/ic_add.xml The
drawable in ModalDialogViewTest.java is swapped because the drawable
used does not matter
- Deletes modaldialog duplicate string resources in favour of
browser_ui_strings_grd

BUG=1093825

Change-Id: I8efa45de23c598123844a64621be6307830e0c26
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2371682
Commit-Queue: Peter Kotwicz <pkotwicz@chromium.org>
Reviewed-by: default avatarTed Choc <tedchoc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#801403}
parent f056de8c
...@@ -110,7 +110,7 @@ public class ModalDialogViewRenderTest extends DummyUiActivityTestCase { ...@@ -110,7 +110,7 @@ public class ModalDialogViewRenderTest extends DummyUiActivityTestCase {
public void testRender_TitleAndTitleIcon() throws IOException { public void testRender_TitleAndTitleIcon() throws IOException {
setUpViews(R.style.Theme_Chromium_ModalDialog_TextPrimaryButton); setUpViews(R.style.Theme_Chromium_ModalDialog_TextPrimaryButton);
final Drawable icon = UiUtils.getTintedDrawable( final Drawable icon = UiUtils.getTintedDrawable(
getActivity(), R.drawable.ic_add, R.color.default_icon_color); getActivity(), org.chromium.chrome.R.drawable.ic_add, R.color.default_icon_color);
createModel(mModelBuilder.with(ModalDialogProperties.TITLE, mResources, R.string.title) createModel(mModelBuilder.with(ModalDialogProperties.TITLE, mResources, R.string.title)
.with(ModalDialogProperties.TITLE_ICON, icon)); .with(ModalDialogProperties.TITLE_ICON, icon));
mRenderTestRule.render(mModalDialogView, "title_and_title_icon"); mRenderTestRule.render(mModalDialogView, "title_and_title_icon");
......
...@@ -75,13 +75,10 @@ android_resources("java_test_resources") { ...@@ -75,13 +75,10 @@ android_resources("java_test_resources") {
testonly = true testonly = true
create_srcjar = false create_srcjar = false
sources = [ sources = [ "test/java/res/values/ids.xml" ]
"test/java/res/drawable/ic_add.xml",
"test/java/res/values/ids.xml",
"test/java/res/values/strings.xml",
]
deps = [ deps = [
":java_resources", ":java_resources",
"//components/browser_ui/strings/android:browser_ui_strings_grd",
"//ui/android:ui_java_resources", "//ui/android:ui_java_resources",
] ]
} }
...@@ -159,7 +159,7 @@ public class ModalDialogViewTest extends DummyUiActivityTestCase { ...@@ -159,7 +159,7 @@ public class ModalDialogViewTest extends DummyUiActivityTestCase {
public void testTitleIcon() { public void testTitleIcon() {
// Verify that the icon set from builder is displayed. // Verify that the icon set from builder is displayed.
PropertyModel model = createModel(mModelBuilder.with( PropertyModel model = createModel(mModelBuilder.with(
ModalDialogProperties.TITLE_ICON, getActivity(), R.drawable.ic_add)); ModalDialogProperties.TITLE_ICON, getActivity(), R.drawable.ic_business));
onView(allOf(withId(R.id.title), withParent(withId(R.id.title_container)))) onView(allOf(withId(R.id.title), withParent(withId(R.id.title_container))))
.check(matches(not(isDisplayed()))); .check(matches(not(isDisplayed())));
onView(allOf(withId(R.id.title_icon), withParent(withId(R.id.title_container)))) onView(allOf(withId(R.id.title_icon), withParent(withId(R.id.title_container))))
......
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2017 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:targetApi="21"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:pathData="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"
android:fillColor="@android:color/black" />
</vector>
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2019 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. -->
<resources>
<string name="title" translatable="false">Title</string>
<string name="more" translatable="false">More</string>
<string name="cancel" translatable="false">Cancel</string>
<string name="ok" translatable="false">OK</string>
</resources>
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