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

Side by Side Diff: chrome/browser/ui/views/location_bar/page_action_image_view_interactive_uitest.cc

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 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 "chrome/browser/ui/views/location_bar/page_action_image_view.h" 5 #include "chrome/browser/ui/views/location_bar/page_action_image_view.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "chrome/browser/extensions/extension_action_manager.h" 9 #include "chrome/browser/extensions/extension_action_manager.h"
10 #include "chrome/browser/extensions/extension_browsertest.h" 10 #include "chrome/browser/extensions/extension_browsertest.h"
(...skipping 18 matching lines...) Expand all
29 ~PageActionImageViewInteractiveUITest() override {} 29 ~PageActionImageViewInteractiveUITest() override {}
30 30
31 void SetUpCommandLine(base::CommandLine* command_line) override { 31 void SetUpCommandLine(base::CommandLine* command_line) override {
32 ExtensionBrowserTest::SetUpCommandLine(command_line); 32 ExtensionBrowserTest::SetUpCommandLine(command_line);
33 // Testing page action-specific UI means we need to disable the redesign. 33 // Testing page action-specific UI means we need to disable the redesign.
34 disable_redesign_.reset(new extensions::FeatureSwitch::ScopedOverride( 34 disable_redesign_.reset(new extensions::FeatureSwitch::ScopedOverride(
35 extensions::FeatureSwitch::extension_action_redesign(), false)); 35 extensions::FeatureSwitch::extension_action_redesign(), false));
36 } 36 }
37 37
38 private: 38 private:
39 scoped_ptr<extensions::FeatureSwitch::ScopedOverride> disable_redesign_; 39 std::unique_ptr<extensions::FeatureSwitch::ScopedOverride> disable_redesign_;
40 40
41 DISALLOW_COPY_AND_ASSIGN(PageActionImageViewInteractiveUITest); 41 DISALLOW_COPY_AND_ASSIGN(PageActionImageViewInteractiveUITest);
42 }; 42 };
43 43
44 // An ImageSkia source that will do nothing. We need this because we need a 44 // An ImageSkia source that will do nothing. We need this because we need a
45 // blank canvas at a certain size, and that can't be done by just using a null 45 // blank canvas at a certain size, and that can't be done by just using a null
46 // ImageSkia. 46 // ImageSkia.
47 class BlankImageSource : public gfx::CanvasImageSource { 47 class BlankImageSource : public gfx::CanvasImageSource {
48 public: 48 public:
49 explicit BlankImageSource(const gfx::Size& size) 49 explicit BlankImageSource(const gfx::Size& size)
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 ui_controls::LEFT, 177 ui_controls::LEFT,
178 ui_controls::UP | ui_controls::DOWN, 178 ui_controls::UP | ui_controls::DOWN,
179 run_loop.QuitClosure()); 179 run_loop.QuitClosure());
180 run_loop.Run(); 180 run_loop.Run();
181 listener.WaitUntilSatisfied(); 181 listener.WaitUntilSatisfied();
182 } 182 }
183 183
184 // Since the action ran, it should no longer be visible. 184 // Since the action ran, it should no longer be visible.
185 EXPECT_EQ(0, location_bar_testing->PageActionVisibleCount()); 185 EXPECT_EQ(0, location_bar_testing->PageActionVisibleCount());
186 } 186 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/location_bar/page_action_image_view.h ('k') | chrome/browser/ui/views/location_bar/zoom_bubble_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698