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

Side by Side Diff: chrome/browser/ui/toolbar/toolbar_actions_bar_unittest.cc

Issue 2355513002: Remove ability to switch to pre-MD UI from about:flags. (Closed)
Patch Set: some fixes 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/ui/toolbar/toolbar_actions_bar_unittest.h" 5 #include "chrome/browser/ui/toolbar/toolbar_actions_bar_unittest.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 testing::AssertionSuccess() : 177 testing::AssertionSuccess() :
178 testing::AssertionFailure() << "main bar error:\n" << main_bar_error << 178 testing::AssertionFailure() << "main bar error:\n" << main_bar_error <<
179 "overflow bar error:\n" << overflow_bar_error; 179 "overflow bar error:\n" << overflow_bar_error;
180 } 180 }
181 181
182 // Note: First argument is optional and intentionally left blank. 182 // Note: First argument is optional and intentionally left blank.
183 // (it's a prefix for the generated test cases) 183 // (it's a prefix for the generated test cases)
184 INSTANTIATE_TEST_CASE_P( 184 INSTANTIATE_TEST_CASE_P(
185 , 185 ,
186 ToolbarActionsBarUnitTest, 186 ToolbarActionsBarUnitTest,
187 testing::Values(ui::MaterialDesignController::NON_MATERIAL, 187 testing::Values(ui::MaterialDesignController::MATERIAL_NORMAL,
188 ui::MaterialDesignController::MATERIAL_NORMAL,
189 ui::MaterialDesignController::MATERIAL_HYBRID)); 188 ui::MaterialDesignController::MATERIAL_HYBRID));
190 189
191 TEST_P(ToolbarActionsBarUnitTest, BasicToolbarActionsBarTest) { 190 TEST_P(ToolbarActionsBarUnitTest, BasicToolbarActionsBarTest) {
192 // Add three extensions to the profile; this is the easiest way to have 191 // Add three extensions to the profile; this is the easiest way to have
193 // toolbar actions. 192 // toolbar actions.
194 for (int i = 0; i < 3; ++i) { 193 for (int i = 0; i < 3; ++i) {
195 CreateAndAddExtension( 194 CreateAndAddExtension(
196 base::StringPrintf("extension %d", i), 195 base::StringPrintf("extension %d", i),
197 extensions::extension_action_test_util::BROWSER_ACTION); 196 extensions::extension_action_test_util::BROWSER_ACTION);
198 } 197 }
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 extensions::extension_action_test_util::BROWSER_ACTION); 568 extensions::extension_action_test_util::BROWSER_ACTION);
570 toolbar_model()->SetVisibleIconCount(0u); 569 toolbar_model()->SetVisibleIconCount(0u);
571 { 570 {
572 base::RunLoop run_loop; 571 base::RunLoop run_loop;
573 toolbar_actions_bar()->PopOutAction(action, true, run_loop.QuitClosure()); 572 toolbar_actions_bar()->PopOutAction(action, true, run_loop.QuitClosure());
574 run_loop.Run(); 573 run_loop.Run();
575 } 574 }
576 EXPECT_EQ(1u, toolbar_actions_bar()->GetIconCount()); 575 EXPECT_EQ(1u, toolbar_actions_bar()->GetIconCount());
577 EXPECT_TRUE(toolbar_actions_bar()->NeedsOverflow()); 576 EXPECT_TRUE(toolbar_actions_bar()->NeedsOverflow());
578 } 577 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/layout_constants.h ('k') | ui/base/material_design/material_design_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698