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

Side by Side Diff: chrome/browser/ui/views/extensions/extension_message_bubble_view_browsertest.cc

Issue 2906723003: [Extenisons UI] Remove extension_action_redesign logic from the toolbar (Closed)
Patch Set: comments Created 3 years, 6 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 | « chrome/browser/ui/toolbar/toolbar_actions_model_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/auto_reset.h" 5 #include "base/auto_reset.h"
6 #include "base/macros.h" 6 #include "base/macros.h"
7 #include "chrome/browser/ui/extensions/extension_message_bubble_browsertest.h" 7 #include "chrome/browser/ui/extensions/extension_message_bubble_browsertest.h"
8 #include "chrome/browser/ui/test/test_browser_dialog.h" 8 #include "chrome/browser/ui/test/test_browser_dialog.h"
9 #include "chrome/browser/ui/views/toolbar/toolbar_actions_bar_bubble_views.h" 9 #include "chrome/browser/ui/views/toolbar/toolbar_actions_bar_bubble_views.h"
10 #include "ui/accessibility/ax_node_data.h" 10 #include "ui/accessibility/ax_node_data.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 void ClickActionButton(Browser* browser) override; 63 void ClickActionButton(Browser* browser) override;
64 void ClickDismissButton(Browser* browser) override; 64 void ClickDismissButton(Browser* browser) override;
65 65
66 // Whether to ignore requests from ExtensionMessageBubbleBrowserTest to 66 // Whether to ignore requests from ExtensionMessageBubbleBrowserTest to
67 // CloseBubble(). 67 // CloseBubble().
68 bool block_close_ = false; 68 bool block_close_ = false;
69 69
70 DISALLOW_COPY_AND_ASSIGN(ExtensionMessageBubbleViewBrowserTest); 70 DISALLOW_COPY_AND_ASSIGN(ExtensionMessageBubbleViewBrowserTest);
71 }; 71 };
72 72
73 class ExtensionMessageBubbleViewBrowserTestLegacy
74 : public ExtensionMessageBubbleViewBrowserTest {
75 protected:
76 void SetUpCommandLine(base::CommandLine* command_line) override {
77 ExtensionMessageBubbleViewBrowserTest::SetUpCommandLine(command_line);
78 override_redesign_.reset();
79 override_redesign_.reset(new extensions::FeatureSwitch::ScopedOverride(
80 extensions::FeatureSwitch::extension_action_redesign(), false));
81 }
82 };
83
84 void ExtensionMessageBubbleViewBrowserTest::SetUpCommandLine( 73 void ExtensionMessageBubbleViewBrowserTest::SetUpCommandLine(
85 base::CommandLine* command_line) { 74 base::CommandLine* command_line) {
86 ExtensionMessageBubbleBrowserTest::SetUpCommandLine(command_line); 75 ExtensionMessageBubbleBrowserTest::SetUpCommandLine(command_line);
87 // MD is required on Mac to get a Views bubble. On other platforms, it should 76 // MD is required on Mac to get a Views bubble. On other platforms, it should
88 // not affect the behavior of the bubble (just the appearance), so enable for 77 // not affect the behavior of the bubble (just the appearance), so enable for
89 // all platforms. 78 // all platforms.
90 command_line->AppendSwitch(switches::kExtendMdToSecondaryUi); 79 command_line->AppendSwitch(switches::kExtendMdToSecondaryUi);
91 } 80 }
92 81
93 void ExtensionMessageBubbleViewBrowserTest::ShowDialog( 82 void ExtensionMessageBubbleViewBrowserTest::ShowDialog(
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 Browser* browser) { 145 Browser* browser) {
157 ToolbarActionsBarBubbleViews* bubble = GetViewsBubbleForBrowser(browser); 146 ToolbarActionsBarBubbleViews* bubble = GetViewsBubbleForBrowser(browser);
158 bubble->GetDialogClientView()->CancelWindow(); 147 bubble->GetDialogClientView()->CancelWindow();
159 } 148 }
160 149
161 IN_PROC_BROWSER_TEST_F(ExtensionMessageBubbleViewBrowserTest, 150 IN_PROC_BROWSER_TEST_F(ExtensionMessageBubbleViewBrowserTest,
162 ExtensionBubbleAnchoredToExtensionAction) { 151 ExtensionBubbleAnchoredToExtensionAction) {
163 TestBubbleAnchoredToExtensionAction(); 152 TestBubbleAnchoredToExtensionAction();
164 } 153 }
165 154
166 IN_PROC_BROWSER_TEST_F(ExtensionMessageBubbleViewBrowserTestLegacy, 155 IN_PROC_BROWSER_TEST_F(ExtensionMessageBubbleViewBrowserTest,
167 ExtensionBubbleAnchoredToAppMenu) { 156 ExtensionBubbleAnchoredToAppMenu) {
168 TestBubbleAnchoredToAppMenu(); 157 TestBubbleAnchoredToAppMenu();
169 } 158 }
170 159
171 IN_PROC_BROWSER_TEST_F(ExtensionMessageBubbleViewBrowserTestLegacy, 160 IN_PROC_BROWSER_TEST_F(ExtensionMessageBubbleViewBrowserTest,
172 ExtensionBubbleAnchoredToAppMenuWithOtherAction) { 161 ExtensionBubbleAnchoredToAppMenuWithOtherAction) {
173 TestBubbleAnchoredToAppMenuWithOtherAction(); 162 TestBubbleAnchoredToAppMenuWithOtherAction();
174 } 163 }
175 164
176 IN_PROC_BROWSER_TEST_F(ExtensionMessageBubbleViewBrowserTest, 165 IN_PROC_BROWSER_TEST_F(ExtensionMessageBubbleViewBrowserTest,
177 PRE_ExtensionBubbleShowsOnStartup) { 166 PRE_ExtensionBubbleShowsOnStartup) {
178 PreBubbleShowsOnStartup(); 167 PreBubbleShowsOnStartup();
179 } 168 }
180 169
181 IN_PROC_BROWSER_TEST_F(ExtensionMessageBubbleViewBrowserTest, 170 IN_PROC_BROWSER_TEST_F(ExtensionMessageBubbleViewBrowserTest,
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 TestClickingDismissButton(); 254 TestClickingDismissButton();
266 } 255 }
267 256
268 // BrowserDialogTest for the warning bubble that appears at startup when there 257 // BrowserDialogTest for the warning bubble that appears at startup when there
269 // are extensions installed in developer mode. Can be invoked interactively with 258 // are extensions installed in developer mode. Can be invoked interactively with
270 // --gtest_filter=BrowserDialogTest.Invoke. 259 // --gtest_filter=BrowserDialogTest.Invoke.
271 IN_PROC_BROWSER_TEST_F(ExtensionMessageBubbleViewBrowserTest, 260 IN_PROC_BROWSER_TEST_F(ExtensionMessageBubbleViewBrowserTest,
272 InvokeDialog_devmode_warning) { 261 InvokeDialog_devmode_warning) {
273 RunDialog(); 262 RunDialog();
274 } 263 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/toolbar/toolbar_actions_model_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698