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

Side by Side Diff: chrome/browser/extensions/extension_context_menu_model_unittest.cc

Issue 1662783002: Remove HostDesktopType from Browser::CreateParams (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-12
Patch Set: remove desktop_type_ in bookmark_bubble_sign_in_delegate Created 4 years, 10 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/extensions/extension_context_menu_model.h" 5 #include "chrome/browser/extensions/extension_context_menu_model.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 .SetLocation(location) 171 .SetLocation(location)
172 .Build(); 172 .Build();
173 if (!extension.get()) 173 if (!extension.get())
174 ADD_FAILURE(); 174 ADD_FAILURE();
175 service()->AddExtension(extension.get()); 175 service()->AddExtension(extension.get());
176 return extension.get(); 176 return extension.get();
177 } 177 }
178 178
179 Browser* ExtensionContextMenuModelTest::GetBrowser() { 179 Browser* ExtensionContextMenuModelTest::GetBrowser() {
180 if (!browser_) { 180 if (!browser_) {
181 Browser::CreateParams params(profile(), chrome::GetActiveDesktop()); 181 Browser::CreateParams params(profile());
182 test_window_.reset(new TestBrowserWindow()); 182 test_window_.reset(new TestBrowserWindow());
183 params.window = test_window_.get(); 183 params.window = test_window_.get();
184 browser_.reset(new Browser(params)); 184 browser_.reset(new Browser(params));
185 } 185 }
186 return browser_.get(); 186 return browser_.get();
187 } 187 }
188 188
189 // Tests that applicable menu items are disabled when a ManagementPolicy 189 // Tests that applicable menu items are disabled when a ManagementPolicy
190 // prohibits them. 190 // prohibits them.
191 TEST_F(ExtensionContextMenuModelTest, RequiredInstallationsDisablesItems) { 191 TEST_F(ExtensionContextMenuModelTest, RequiredInstallationsDisablesItems) {
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 "feature_disabled_extension", manifest_keys::kBrowserAction, 652 "feature_disabled_extension", manifest_keys::kBrowserAction,
653 Manifest::INTERNAL, "http://www.google.com/*"); 653 Manifest::INTERNAL, "http://www.google.com/*");
654 ExtensionContextMenuModel feature_disabled_menu( 654 ExtensionContextMenuModel feature_disabled_menu(
655 feature_disabled_extension, GetBrowser(), 655 feature_disabled_extension, GetBrowser(),
656 ExtensionContextMenuModel::VISIBLE, nullptr); 656 ExtensionContextMenuModel::VISIBLE, nullptr);
657 EXPECT_EQ(-1, feature_disabled_menu.GetIndexOfCommandId( 657 EXPECT_EQ(-1, feature_disabled_menu.GetIndexOfCommandId(
658 ExtensionContextMenuModel::PAGE_ACCESS_SUBMENU)); 658 ExtensionContextMenuModel::PAGE_ACCESS_SUBMENU));
659 } 659 }
660 660
661 } // namespace extensions 661 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/tabs/tabs_test.cc ('k') | chrome/browser/extensions/extension_tab_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698