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

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/notifications/NotificationUIManagerTest.java

Issue 1426453003: Notification custom layouts: improve origin display. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test. Created 5 years, 2 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/src/org/chromium/chrome/browser/notifications/NotificationUIManager.java ('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/notifications/NotificationUIManagerTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/notifications/NotificationUIManagerTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/notifications/NotificationUIManagerTest.java
index 792375e2bb46237b5a64c3c747622fcbe32c5ced..05dae122900bb5ec2dfe26f1b5d748d2df5e0c7d 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/notifications/NotificationUIManagerTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/notifications/NotificationUIManagerTest.java
@@ -20,6 +20,7 @@
import org.chromium.base.annotations.SuppressFBWarnings;
import org.chromium.base.test.util.Feature;
import org.chromium.chrome.browser.ChromeActivity;
+import org.chromium.chrome.browser.UrlUtilities;
import org.chromium.chrome.browser.preferences.website.ContentSetting;
import org.chromium.chrome.browser.preferences.website.PushNotificationInfo;
import org.chromium.chrome.browser.widget.RoundedIconGenerator;
@@ -157,7 +158,8 @@ public void testDefaultNotificationProperties() throws Exception {
// Validate the contents of the notification.
assertEquals("MyNotification", notification.extras.getString(Notification.EXTRA_TITLE));
assertEquals("Hello", notification.extras.getString(Notification.EXTRA_TEXT));
- assertEquals(getOrigin(), notification.extras.getString(Notification.EXTRA_SUB_TEXT));
+ assertEquals(UrlUtilities.formatUrlForSecurityDisplay(getOrigin(), false /* showScheme */),
+ notification.extras.getString(Notification.EXTRA_SUB_TEXT));
// Verify that the ticker text contains the notification's title and body.
String tickerText = notification.tickerText.toString();
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationUIManager.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698