| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "base/run_loop.h" | 5 #include "base/run_loop.h" |
| 6 #include "chrome/browser/ui/extensions/extension_action_view_controller.h" | 6 #include "chrome/browser/ui/extensions/extension_action_view_controller.h" |
| 7 #include "chrome/browser/ui/extensions/icon_with_badge_image_source.h" |
| 7 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 8 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 8 #include "chrome/browser/ui/toolbar/toolbar_actions_bar.h" | 9 #include "chrome/browser/ui/toolbar/toolbar_actions_bar.h" |
| 9 #include "chrome/browser/ui/toolbar/toolbar_actions_bar_unittest.h" | 10 #include "chrome/browser/ui/toolbar/toolbar_actions_bar_unittest.h" |
| 10 #include "chrome/common/icon_with_badge_image_source.h" | |
| 11 #include "chrome/grit/chromium_strings.h" | 11 #include "chrome/grit/chromium_strings.h" |
| 12 #include "chrome/grit/generated_resources.h" | 12 #include "chrome/grit/generated_resources.h" |
| 13 #include "ui/base/l10n/l10n_util.h" | 13 #include "ui/base/l10n/l10n_util.h" |
| 14 | 14 |
| 15 // Tests the icon appearance of extension actions without the toolbar redesign. | 15 // Tests the icon appearance of extension actions without the toolbar redesign. |
| 16 // In this case, the action should never be grayscaled or decorated to indicate | 16 // In this case, the action should never be grayscaled or decorated to indicate |
| 17 // whether or not it wants to run. | 17 // whether or not it wants to run. |
| 18 TEST_F(ToolbarActionsBarUnitTest, ExtensionActionNormalAppearance) { | 18 TEST_F(ToolbarActionsBarUnitTest, ExtensionActionNormalAppearance) { |
| 19 CreateAndAddExtension("extension", | 19 CreateAndAddExtension("extension", |
| 20 extensions::extension_action_test_util::BROWSER_ACTION); | 20 extensions::extension_action_test_util::BROWSER_ACTION); |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 toolbar_model()->SetVisibleIconCount(0u); | 120 toolbar_model()->SetVisibleIconCount(0u); |
| 121 check_visibility_string(overflow_bar()->GetActions()[0], | 121 check_visibility_string(overflow_bar()->GetActions()[0], |
| 122 IDS_EXTENSIONS_SHOW_BUTTON_IN_TOOLBAR); | 122 IDS_EXTENSIONS_SHOW_BUTTON_IN_TOOLBAR); |
| 123 base::RunLoop run_loop; | 123 base::RunLoop run_loop; |
| 124 toolbar_actions_bar()->PopOutAction(toolbar_actions_bar()->GetActions()[0], | 124 toolbar_actions_bar()->PopOutAction(toolbar_actions_bar()->GetActions()[0], |
| 125 run_loop.QuitClosure()); | 125 run_loop.QuitClosure()); |
| 126 run_loop.Run(); | 126 run_loop.Run(); |
| 127 check_visibility_string(toolbar_actions_bar()->GetActions()[0], | 127 check_visibility_string(toolbar_actions_bar()->GetActions()[0], |
| 128 IDS_EXTENSIONS_KEEP_BUTTON_IN_TOOLBAR); | 128 IDS_EXTENSIONS_KEEP_BUTTON_IN_TOOLBAR); |
| 129 } | 129 } |
| OLD | NEW |