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

Side by Side Diff: chrome/browser/ui/cocoa/location_bar/location_bar_view_mac_browsertest.mm

Issue 14259008: Instant Extended: Add prominent search term support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/location_bar/location_bar_view_mac.h" 5 #import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h"
6 6
7 #import "chrome/browser/ui/browser_window.h" 7 #import "chrome/browser/ui/browser_window.h"
8 #import "chrome/browser/ui/cocoa/browser_window_controller.h" 8 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
9 #import "chrome/browser/ui/cocoa/location_bar/search_token_decoration.h" 9 #import "chrome/browser/ui/cocoa/location_bar/search_token_decoration.h"
10 #import "chrome/browser/ui/cocoa/location_bar/separator_decoration.h" 10 #import "chrome/browser/ui/cocoa/location_bar/separator_decoration.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 }; 52 };
53 53
54 // Verify that the search token decoration is displayed when there are search 54 // Verify that the search token decoration is displayed when there are search
55 // terms in the omnibox. 55 // terms in the omnibox.
56 IN_PROC_BROWSER_TEST_F(LocationBarViewMacBrowserTest, SearchToken) { 56 IN_PROC_BROWSER_TEST_F(LocationBarViewMacBrowserTest, SearchToken) {
57 GetLocationBar()->Layout(); 57 GetLocationBar()->Layout();
58 EXPECT_FALSE(GetSearchTokenDecoration()->IsVisible()); 58 EXPECT_FALSE(GetSearchTokenDecoration()->IsVisible());
59 EXPECT_FALSE(GetSeparatorDecoration()->IsVisible()); 59 EXPECT_FALSE(GetSeparatorDecoration()->IsVisible());
60 60
61 test_toolbar_model_.SetInputInProgress(false); 61 test_toolbar_model_.SetInputInProgress(false);
62 test_toolbar_model_.set_replace_search_url_with_search_terms(true); 62 test_toolbar_model_.set_search_terms_type(ToolbarModel::NORMAL_SEARCH_TERMS);
63 GetLocationBar()->Layout(); 63 GetLocationBar()->Layout();
64 EXPECT_TRUE(GetSearchTokenDecoration()->IsVisible()); 64 EXPECT_TRUE(GetSearchTokenDecoration()->IsVisible());
65 EXPECT_TRUE(GetSeparatorDecoration()->IsVisible()); 65 EXPECT_TRUE(GetSeparatorDecoration()->IsVisible());
66 66
67 test_toolbar_model_.SetInputInProgress(true); 67 test_toolbar_model_.SetInputInProgress(true);
68 GetLocationBar()->Layout(); 68 GetLocationBar()->Layout();
69 EXPECT_FALSE(GetSearchTokenDecoration()->IsVisible()); 69 EXPECT_FALSE(GetSearchTokenDecoration()->IsVisible());
70 EXPECT_FALSE(GetSeparatorDecoration()->IsVisible()); 70 EXPECT_FALSE(GetSeparatorDecoration()->IsVisible());
71 } 71 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm ('k') | chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698