Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTest.java

Issue 1263573011: Let client specify content description for custom action button (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix corresponding test Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/android/java/strings/android_chrome_strings.grd ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTest.java
index 5e8bb13da7e67df09cf1431214ade0a18e9da6a5..551f01189e2dfee7c3fa07de6f1a55d959037713 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTest.java
@@ -125,13 +125,14 @@ public class CustomTabActivityTest extends CustomTabActivityTestBase {
* Adds an action button to the custom tab toolbar.
* @return The {@link PendingIntent} that will be triggered when the action button is clicked.
*/
- private PendingIntent addActionButtonToIntent(Intent intent, Bitmap icon) {
+ private PendingIntent addActionButtonToIntent(Intent intent, Bitmap icon, String description) {
Intent actionIntent = new Intent();
actionIntent.setClass(getInstrumentation().getContext(), DummyBroadcastReceiver.class);
actionIntent.setAction(TEST_ACTION);
Bundle bundle = new Bundle();
bundle.putParcelable(CustomTabsIntent.KEY_ICON, icon);
+ bundle.putString(CustomTabsIntent.KEY_DESCRIPTION, description);
PendingIntent pi = PendingIntent.getBroadcast(getInstrumentation().getTargetContext(), 0,
actionIntent, 0);
bundle.putParcelable(CustomTabsIntent.KEY_PENDING_INTENT, pi);
@@ -315,7 +316,7 @@ public class CustomTabActivityTest extends CustomTabActivityTestBase {
(int) (iconHeightDp * density), Bitmap.Config.ARGB_8888);
Intent intent = createMinimalCustomTabIntent();
- final PendingIntent pi = addActionButtonToIntent(intent, expectedIcon);
+ final PendingIntent pi = addActionButtonToIntent(intent, expectedIcon, "Good test");
startCustomTabActivityWithIntent(intent);
final OnFinishedForTest onFinished = new OnFinishedForTest(pi);
@@ -363,7 +364,7 @@ public class CustomTabActivityTest extends CustomTabActivityTestBase {
(int) (iconHeightDp * density), Bitmap.Config.ARGB_8888);
Intent intent = createMinimalCustomTabIntent();
- addActionButtonToIntent(intent, expectedIcon);
+ addActionButtonToIntent(intent, expectedIcon, "Good test");
startCustomTabActivityWithIntent(intent);
View toolbarView = getActivity().findViewById(R.id.toolbar);
« no previous file with comments | « chrome/android/java/strings/android_chrome_strings.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698