| OLD | NEW |
| 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 Loading... |
| 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_term_type(ToolbarModel::SEARCH_TERM_NORMAL); |
| 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 } |
| OLD | NEW |