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

Unified Diff: chrome/browser/ui/cocoa/status_bubble_mac_unittest.mm

Issue 1841653003: Drop |languages| from {Format,Elide}Url* and IDNToUnicode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix typo in elide_url.cc Created 4 years, 8 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
Index: chrome/browser/ui/cocoa/status_bubble_mac_unittest.mm
diff --git a/chrome/browser/ui/cocoa/status_bubble_mac_unittest.mm b/chrome/browser/ui/cocoa/status_bubble_mac_unittest.mm
index 79a134b8c107c4599a6340c6a5be3adb635663f5..1274f9256e5a7f87d1f68786be0f488c13acd2ea 100644
--- a/chrome/browser/ui/cocoa/status_bubble_mac_unittest.mm
+++ b/chrome/browser/ui/cocoa/status_bubble_mac_unittest.mm
@@ -193,20 +193,20 @@ TEST_F(StatusBubbleMacTest, SetStatus) {
}
TEST_F(StatusBubbleMacTest, SetURL) {
- bubble_->SetURL(GURL(), std::string());
+ bubble_->SetURL(GURL());
EXPECT_FALSE(IsVisible());
- bubble_->SetURL(GURL("bad url"), std::string());
+ bubble_->SetURL(GURL("bad url"));
EXPECT_FALSE(IsVisible());
- bubble_->SetURL(GURL("http://"), std::string());
+ bubble_->SetURL(GURL("http://"));
EXPECT_TRUE(IsVisible());
EXPECT_NSEQ(@"http:", GetURLText());
- bubble_->SetURL(GURL("about:blank"), std::string());
+ bubble_->SetURL(GURL("about:blank"));
EXPECT_TRUE(IsVisible());
EXPECT_NSEQ(@"about:blank", GetURLText());
- bubble_->SetURL(GURL("foopy://"), std::string());
+ bubble_->SetURL(GURL("foopy://"));
EXPECT_TRUE(IsVisible());
EXPECT_NSEQ(@"foopy://", GetURLText());
- bubble_->SetURL(GURL("http://www.cnn.com"), std::string());
+ bubble_->SetURL(GURL("http://www.cnn.com"));
EXPECT_TRUE(IsVisible());
EXPECT_NSEQ(@"www.cnn.com", GetURLText());
}
@@ -227,15 +227,15 @@ TEST_F(StatusBubbleMacTest, SetStatusAndURL) {
bubble_->SetStatus(UTF8ToUTF16("Status"));
EXPECT_TRUE(IsVisible());
EXPECT_NSEQ(@"Status", GetBubbleViewText());
- bubble_->SetURL(GURL("http://www.nytimes.com"), std::string());
+ bubble_->SetURL(GURL("http://www.nytimes.com"));
EXPECT_TRUE(IsVisible());
EXPECT_NSEQ(@"www.nytimes.com", GetBubbleViewText());
- bubble_->SetURL(GURL(), std::string());
+ bubble_->SetURL(GURL());
EXPECT_TRUE(IsVisible());
EXPECT_NSEQ(@"Status", GetBubbleViewText());
bubble_->SetStatus(base::string16());
EXPECT_FALSE(IsVisible());
- bubble_->SetURL(GURL("http://www.nytimes.com"), std::string());
+ bubble_->SetURL(GURL("http://www.nytimes.com"));
EXPECT_TRUE(IsVisible());
EXPECT_NSEQ(@"www.nytimes.com", GetBubbleViewText());
bubble_->SetStatus(UTF8ToUTF16("Status"));
@@ -244,7 +244,7 @@ TEST_F(StatusBubbleMacTest, SetStatusAndURL) {
bubble_->SetStatus(base::string16());
EXPECT_TRUE(IsVisible());
EXPECT_NSEQ(@"www.nytimes.com", GetBubbleViewText());
- bubble_->SetURL(GURL(), std::string());
+ bubble_->SetURL(GURL());
EXPECT_FALSE(IsVisible());
}
@@ -591,8 +591,7 @@ TEST_F(StatusBubbleMacTest, ExpandBubble) {
// Check basic expansion
bubble_->SetStatus(UTF8ToUTF16("Showing"));
EXPECT_TRUE(IsVisible());
- bubble_->SetURL(GURL("http://www.battersbox.com/peter_paul_and_mary.html"),
- std::string());
+ bubble_->SetURL(GURL("http://www.battersbox.com/peter_paul_and_mary.html"));
EXPECT_TRUE([GetURLText() hasSuffix:@"\u2026"]);
bubble_->ExpandBubble();
EXPECT_TRUE(IsVisible());
@@ -601,15 +600,13 @@ TEST_F(StatusBubbleMacTest, ExpandBubble) {
// Make sure bubble resets after hide.
bubble_->SetStatus(UTF8ToUTF16("Showing"));
- bubble_->SetURL(GURL("http://www.snickersnee.com/pioneer_fishstix.html"),
- std::string());
+ bubble_->SetURL(GURL("http://www.snickersnee.com/pioneer_fishstix.html"));
EXPECT_TRUE([GetURLText() hasSuffix:@"\u2026"]);
// ...and that it expands again properly.
bubble_->ExpandBubble();
EXPECT_NSEQ(@"www.snickersnee.com/pioneer_fishstix.html", GetURLText());
// ...again, again!
- bubble_->SetURL(GURL("http://www.battersbox.com/peter_paul_and_mary.html"),
- std::string());
+ bubble_->SetURL(GURL("http://www.battersbox.com/peter_paul_and_mary.html"));
bubble_->ExpandBubble();
EXPECT_NSEQ(@"www.battersbox.com/peter_paul_and_mary.html", GetURLText());
bubble_->Hide();
@@ -622,7 +619,7 @@ TEST_F(StatusBubbleMacTest, ExpandBubble) {
bubble_->SetStatus(UTF8ToUTF16("Showing"));
const char veryLongUrl[] =
"http://www.diewahrscheinlichlaengstepralinederwelt.com/duuuuplo.html";
- bubble_->SetURL(GURL(veryLongUrl), std::string());
+ bubble_->SetURL(GURL(veryLongUrl));
EXPECT_TRUE([GetURLText() hasSuffix:@"\u2026"]);
bubble_->ExpandBubble();
EXPECT_TRUE([GetURLText() hasSuffix:@"\u2026"]);
« no previous file with comments | « chrome/browser/ui/cocoa/status_bubble_mac.mm ('k') | chrome/browser/ui/content_settings/content_setting_bubble_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698