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

Side by Side Diff: chrome/browser/ui/location_bar/location_bar_browsertest.cc

Issue 671653002: Standardize usage of virtual/override/final in chrome/browser/ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 "base/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "base/run_loop.h" 6 #include "base/run_loop.h"
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "chrome/browser/extensions/api/extension_action/extension_action_api.h" 8 #include "chrome/browser/extensions/api/extension_action/extension_action_api.h"
9 #include "chrome/browser/extensions/extension_action.h" 9 #include "chrome/browser/extensions/extension_action.h"
10 #include "chrome/browser/extensions/extension_action_manager.h" 10 #include "chrome/browser/extensions/extension_action_manager.h"
(...skipping 28 matching lines...) Expand all
39 "}"; 39 "}";
40 40
41 } // namespace 41 } // namespace
42 42
43 class LocationBarBrowserTest : public ExtensionBrowserTest { 43 class LocationBarBrowserTest : public ExtensionBrowserTest {
44 public: 44 public:
45 LocationBarBrowserTest() {} 45 LocationBarBrowserTest() {}
46 virtual ~LocationBarBrowserTest() {} 46 virtual ~LocationBarBrowserTest() {}
47 47
48 protected: 48 protected:
49 virtual void SetUpCommandLine(base::CommandLine* command_line) override; 49 void SetUpCommandLine(base::CommandLine* command_line) override;
50 50
51 // Load an extension with a PageAction that sends a message when clicked. 51 // Load an extension with a PageAction that sends a message when clicked.
52 const extensions::Extension* LoadPageActionExtension( 52 const extensions::Extension* LoadPageActionExtension(
53 extensions::TestExtensionDir* dir); 53 extensions::TestExtensionDir* dir);
54 54
55 private: 55 private:
56 scoped_ptr<extensions::FeatureSwitch::ScopedOverride> enable_override_; 56 scoped_ptr<extensions::FeatureSwitch::ScopedOverride> enable_override_;
57 57
58 DISALLOW_COPY_AND_ASSIGN(LocationBarBrowserTest); 58 DISALLOW_COPY_AND_ASSIGN(LocationBarBrowserTest);
59 }; 59 };
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 // The star should now be hidden. 163 // The star should now be hidden.
164 EXPECT_FALSE(location_bar->GetBookmarkStarVisibility()); 164 EXPECT_FALSE(location_bar->GetBookmarkStarVisibility());
165 } 165 }
166 166
167 class LocationBarBrowserTestWithRedesign : public LocationBarBrowserTest { 167 class LocationBarBrowserTestWithRedesign : public LocationBarBrowserTest {
168 public: 168 public:
169 LocationBarBrowserTestWithRedesign() {} 169 LocationBarBrowserTestWithRedesign() {}
170 virtual ~LocationBarBrowserTestWithRedesign() {} 170 virtual ~LocationBarBrowserTestWithRedesign() {}
171 171
172 private: 172 private:
173 virtual void SetUpCommandLine(base::CommandLine* command_line) override; 173 void SetUpCommandLine(base::CommandLine* command_line) override;
174 174
175 scoped_ptr<extensions::FeatureSwitch::ScopedOverride> enable_redesign_; 175 scoped_ptr<extensions::FeatureSwitch::ScopedOverride> enable_redesign_;
176 176
177 DISALLOW_COPY_AND_ASSIGN(LocationBarBrowserTestWithRedesign); 177 DISALLOW_COPY_AND_ASSIGN(LocationBarBrowserTestWithRedesign);
178 }; 178 };
179 179
180 void LocationBarBrowserTestWithRedesign::SetUpCommandLine( 180 void LocationBarBrowserTestWithRedesign::SetUpCommandLine(
181 base::CommandLine* command_line) { 181 base::CommandLine* command_line) {
182 LocationBarBrowserTest::SetUpCommandLine(command_line); 182 LocationBarBrowserTest::SetUpCommandLine(command_line);
183 enable_redesign_.reset(new extensions::FeatureSwitch::ScopedOverride( 183 enable_redesign_.reset(new extensions::FeatureSwitch::ScopedOverride(
(...skipping 26 matching lines...) Expand all
210 browser()->tab_strip_model()->GetActiveWebContents(); 210 browser()->tab_strip_model()->GetActiveWebContents();
211 int tab_id = SessionTabHelper::IdForTab(tab); 211 int tab_id = SessionTabHelper::IdForTab(tab);
212 action->SetIsVisible(tab_id, true); 212 action->SetIsVisible(tab_id, true);
213 extensions::ExtensionActionAPI::Get(profile())->NotifyChange( 213 extensions::ExtensionActionAPI::Get(profile())->NotifyChange(
214 action, tab, profile()); 214 action, tab, profile());
215 215
216 // We should still have no page actions. 216 // We should still have no page actions.
217 EXPECT_EQ(0, location_bar->PageActionCount()); 217 EXPECT_EQ(0, location_bar->PageActionCount());
218 EXPECT_EQ(0, location_bar->PageActionVisibleCount()); 218 EXPECT_EQ(0, location_bar->PageActionVisibleCount());
219 } 219 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698