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

Side by Side Diff: chrome/browser/ui/cocoa/status_bubble_mac_unittest.mm

Issue 2963883002: Omnibox UI Experiments: Refactor HTTPS trimming into UrlFormatter. (Closed)
Patch Set: fix Created 3 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | components/omnibox/browser/autocomplete_match.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/ui/cocoa/status_bubble_mac.h" 5 #import "chrome/browser/ui/cocoa/status_bubble_mac.h"
6 6
7 #include <Cocoa/Cocoa.h> 7 #include <Cocoa/Cocoa.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 bubble_->SetStatus(base::string16()); 193 bubble_->SetStatus(base::string16());
194 EXPECT_FALSE(IsVisible()); 194 EXPECT_FALSE(IsVisible());
195 } 195 }
196 196
197 TEST_F(StatusBubbleMacTest, SetURL) { 197 TEST_F(StatusBubbleMacTest, SetURL) {
198 bubble_->SetURL(GURL()); 198 bubble_->SetURL(GURL());
199 EXPECT_FALSE(IsVisible()); 199 EXPECT_FALSE(IsVisible());
200 bubble_->SetURL(GURL("bad url")); 200 bubble_->SetURL(GURL("bad url"));
201 EXPECT_FALSE(IsVisible()); 201 EXPECT_FALSE(IsVisible());
202 bubble_->SetURL(GURL("http://")); 202 bubble_->SetURL(GURL("http://"));
203 EXPECT_TRUE(IsVisible()); 203 EXPECT_FALSE(IsVisible());
204 EXPECT_NSEQ(@"http:", GetURLText());
205 bubble_->SetURL(GURL("about:blank")); 204 bubble_->SetURL(GURL("about:blank"));
206 EXPECT_TRUE(IsVisible()); 205 EXPECT_TRUE(IsVisible());
207 EXPECT_NSEQ(@"about:blank", GetURLText()); 206 EXPECT_NSEQ(@"about:blank", GetURLText());
208 bubble_->SetURL(GURL("foopy://")); 207 bubble_->SetURL(GURL("foopy://"));
209 EXPECT_TRUE(IsVisible()); 208 EXPECT_TRUE(IsVisible());
210 EXPECT_NSEQ(@"foopy://", GetURLText()); 209 EXPECT_NSEQ(@"foopy://", GetURLText());
211 bubble_->SetURL(GURL("http://www.cnn.com")); 210 bubble_->SetURL(GURL("http://www.cnn.com"));
212 EXPECT_TRUE(IsVisible()); 211 EXPECT_TRUE(IsVisible());
213 EXPECT_NSEQ(@"www.cnn.com", GetURLText()); 212 EXPECT_NSEQ(@"www.cnn.com", GetURLText());
214 } 213 }
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 backing:NSBackingStoreBuffered 674 backing:NSBackingStoreBuffered
676 defer:NO]); 675 defer:NO]);
677 676
678 // Switch parents with the bubble hidden. 677 // Switch parents with the bubble hidden.
679 bubble_->SwitchParentWindow(fullscreenParent); 678 bubble_->SwitchParentWindow(fullscreenParent);
680 679
681 // Switch back to the original parent with the bubble showing. 680 // Switch back to the original parent with the bubble showing.
682 bubble_->SetStatus(UTF8ToUTF16("Showing")); 681 bubble_->SetStatus(UTF8ToUTF16("Showing"));
683 bubble_->SwitchParentWindow(test_window()); 682 bubble_->SwitchParentWindow(test_window());
684 } 683 }
OLDNEW
« no previous file with comments | « no previous file | components/omnibox/browser/autocomplete_match.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698