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

Side by Side Diff: chrome/browser/ui/toolbar/app_menu_model_unittest.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/app_menu_model.h" 5 #include "chrome/browser/ui/toolbar/app_menu_model.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "chrome/app/chrome_command_ids.h" 8 #include "chrome/app/chrome_command_ids.h"
9 #include "chrome/browser/defaults.h" 9 #include "chrome/browser/defaults.h"
10 #include "chrome/browser/prefs/browser_prefs.h" 10 #include "chrome/browser/prefs/browser_prefs.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 } 74 }
75 75
76 void TearDown() override { 76 void TearDown() override {
77 BrowserWithTestWindowTest::TearDown(); 77 BrowserWithTestWindowTest::TearDown();
78 testing_io_thread_state_.reset(); 78 testing_io_thread_state_.reset();
79 TestingBrowserProcess::GetGlobal()->SetLocalState(NULL); 79 TestingBrowserProcess::GetGlobal()->SetLocalState(NULL);
80 DestroyBrowserAndProfile(); 80 DestroyBrowserAndProfile();
81 } 81 }
82 82
83 private: 83 private:
84 scoped_ptr<TestingPrefServiceSimple> prefs_; 84 std::unique_ptr<TestingPrefServiceSimple> prefs_;
85 scoped_ptr<chrome::TestingIOThreadState> testing_io_thread_state_; 85 std::unique_ptr<chrome::TestingIOThreadState> testing_io_thread_state_;
86 }; 86 };
87 87
88 // Copies parts of MenuModelTest::Delegate and combines them with the 88 // Copies parts of MenuModelTest::Delegate and combines them with the
89 // AppMenuModel since AppMenuModel is now a SimpleMenuModel::Delegate and 89 // AppMenuModel since AppMenuModel is now a SimpleMenuModel::Delegate and
90 // not derived from SimpleMenuModel. 90 // not derived from SimpleMenuModel.
91 class TestAppMenuModel : public AppMenuModel { 91 class TestAppMenuModel : public AppMenuModel {
92 public: 92 public:
93 TestAppMenuModel(ui::AcceleratorProvider* provider, Browser* browser) 93 TestAppMenuModel(ui::AcceleratorProvider* provider, Browser* browser)
94 : AppMenuModel(provider, browser), 94 : AppMenuModel(provider, browser),
95 execute_count_(0), 95 execute_count_(0),
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 206
207 class EncodingMenuModelTest : public BrowserWithTestWindowTest, 207 class EncodingMenuModelTest : public BrowserWithTestWindowTest,
208 public MenuModelTest { 208 public MenuModelTest {
209 }; 209 };
210 210
211 TEST_F(EncodingMenuModelTest, IsCommandIdCheckedWithNoTabs) { 211 TEST_F(EncodingMenuModelTest, IsCommandIdCheckedWithNoTabs) {
212 EncodingMenuModel model(browser()); 212 EncodingMenuModel model(browser());
213 ASSERT_EQ(NULL, browser()->tab_strip_model()->GetActiveWebContents()); 213 ASSERT_EQ(NULL, browser()->tab_strip_model()->GetActiveWebContents());
214 EXPECT_FALSE(model.IsCommandIdChecked(IDC_ENCODING_WINDOWS1252)); 214 EXPECT_FALSE(model.IsCommandIdChecked(IDC_ENCODING_WINDOWS1252));
215 } 215 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/toolbar/app_menu_model.h ('k') | chrome/browser/ui/toolbar/back_forward_menu_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698