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

Side by Side Diff: chrome/browser/ui/views/toolbar/toolbar_action_view_interactive_uitest.cc

Issue 2311533002: [Extensions UI] Remove override of toolbar redesign in many tests (Closed)
Patch Set: mac Created 4 years, 3 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/views/toolbar/browser_actions_container_browsertest.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/location.h" 5 #include "base/location.h"
6 #include "base/macros.h" 6 #include "base/macros.h"
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "base/single_thread_task_runner.h" 8 #include "base/single_thread_task_runner.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 class ToolbarActionViewInteractiveUITest : public ExtensionBrowserTest { 132 class ToolbarActionViewInteractiveUITest : public ExtensionBrowserTest {
133 protected: 133 protected:
134 ToolbarActionViewInteractiveUITest(); 134 ToolbarActionViewInteractiveUITest();
135 ~ToolbarActionViewInteractiveUITest() override; 135 ~ToolbarActionViewInteractiveUITest() override;
136 136
137 // ExtensionBrowserTest: 137 // ExtensionBrowserTest:
138 void SetUpCommandLine(base::CommandLine* command_line) override; 138 void SetUpCommandLine(base::CommandLine* command_line) override;
139 void TearDownOnMainThread() override; 139 void TearDownOnMainThread() override;
140 140
141 private: 141 private:
142 // Override the extensions-action-redesign switch.
143 std::unique_ptr<extensions::FeatureSwitch::ScopedOverride> feature_override_;
144
145 DISALLOW_COPY_AND_ASSIGN(ToolbarActionViewInteractiveUITest); 142 DISALLOW_COPY_AND_ASSIGN(ToolbarActionViewInteractiveUITest);
146 }; 143 };
147 144
148 ToolbarActionViewInteractiveUITest::ToolbarActionViewInteractiveUITest() {} 145 ToolbarActionViewInteractiveUITest::ToolbarActionViewInteractiveUITest() {}
149 ToolbarActionViewInteractiveUITest::~ToolbarActionViewInteractiveUITest() {} 146 ToolbarActionViewInteractiveUITest::~ToolbarActionViewInteractiveUITest() {}
150 147
151 void ToolbarActionViewInteractiveUITest::SetUpCommandLine( 148 void ToolbarActionViewInteractiveUITest::SetUpCommandLine(
152 base::CommandLine* command_line) { 149 base::CommandLine* command_line) {
153 ExtensionBrowserTest::SetUpCommandLine(command_line); 150 ExtensionBrowserTest::SetUpCommandLine(command_line);
154 // We do this before the rest of the setup because it can affect how the views
155 // are constructed.
156 feature_override_.reset(new extensions::FeatureSwitch::ScopedOverride(
157 extensions::FeatureSwitch::extension_action_redesign(), true));
158 ToolbarActionsBar::disable_animations_for_testing_ = true; 151 ToolbarActionsBar::disable_animations_for_testing_ = true;
159 } 152 }
160 153
161 void ToolbarActionViewInteractiveUITest::TearDownOnMainThread() { 154 void ToolbarActionViewInteractiveUITest::TearDownOnMainThread() {
162 ToolbarActionsBar::disable_animations_for_testing_ = false; 155 ToolbarActionsBar::disable_animations_for_testing_ = false;
163 } 156 }
164 157
165 #if defined(USE_OZONE) || defined(OS_WIN) 158 #if defined(USE_OZONE) || defined(OS_WIN)
166 // ozone bringup - http://crbug.com/401304 159 // ozone bringup - http://crbug.com/401304
167 // flaky on Windows - http://crbug.com/638692 160 // flaky on Windows - http://crbug.com/638692
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 // the message loop. Wait for this all to complete. 372 // the message loop. Wait for this all to complete.
380 EXPECT_TRUE(ui_test_utils::SendKeyPressToWindowSync( 373 EXPECT_TRUE(ui_test_utils::SendKeyPressToWindowSync(
381 native_window, ui::VKEY_RETURN, false, false, false, false)); 374 native_window, ui::VKEY_RETURN, false, false, false, false));
382 base::RunLoop().RunUntilIdle(); 375 base::RunLoop().RunUntilIdle();
383 376
384 // The menu should be closed. 377 // The menu should be closed.
385 EXPECT_FALSE(app_menu_button->IsMenuShowing()); 378 EXPECT_FALSE(app_menu_button->IsMenuShowing());
386 // And the extension should have been activated. 379 // And the extension should have been activated.
387 EXPECT_TRUE(listener.WaitUntilSatisfied()); 380 EXPECT_TRUE(listener.WaitUntilSatisfied());
388 } 381 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/toolbar/browser_actions_container_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698