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

Side by Side Diff: chrome/browser/extensions/api/management/management_api_unittest.cc

Issue 1336823003: Move chrome::HostDesktopType to ui::HostDesktopType (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@base_session_service_delegate_impl
Patch Set: Fix build on Mac and CrOS Created 5 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 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 "base/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "chrome/browser/extensions/extension_function_test_utils.h" 6 #include "chrome/browser/extensions/extension_function_test_utils.h"
7 #include "chrome/browser/extensions/extension_service.h" 7 #include "chrome/browser/extensions/extension_service.h"
8 #include "chrome/browser/extensions/extension_service_test_base.h" 8 #include "chrome/browser/extensions/extension_service_test_base.h"
9 #include "chrome/browser/extensions/test_extension_system.h" 9 #include "chrome/browser/extensions/test_extension_system.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 void ManagementApiUnitTest::SetUp() { 80 void ManagementApiUnitTest::SetUp() {
81 ExtensionServiceTestBase::SetUp(); 81 ExtensionServiceTestBase::SetUp();
82 InitializeEmptyExtensionService(); 82 InitializeEmptyExtensionService();
83 ManagementAPI::GetFactoryInstance()->SetTestingFactory(profile(), 83 ManagementAPI::GetFactoryInstance()->SetTestingFactory(profile(),
84 &BuildManagementApi); 84 &BuildManagementApi);
85 85
86 EventRouterFactory::GetInstance()->SetTestingFactory(profile(), 86 EventRouterFactory::GetInstance()->SetTestingFactory(profile(),
87 &BuildEventRouter); 87 &BuildEventRouter);
88 88
89 browser_window_.reset(new TestBrowserWindow()); 89 browser_window_.reset(new TestBrowserWindow());
90 Browser::CreateParams params(profile(), chrome::HOST_DESKTOP_TYPE_NATIVE); 90 Browser::CreateParams params(profile(), ui::HOST_DESKTOP_TYPE_NATIVE);
91 params.type = Browser::TYPE_TABBED; 91 params.type = Browser::TYPE_TABBED;
92 params.window = browser_window_.get(); 92 params.window = browser_window_.get();
93 browser_.reset(new Browser(params)); 93 browser_.reset(new Browser(params));
94 } 94 }
95 95
96 void ManagementApiUnitTest::TearDown() { 96 void ManagementApiUnitTest::TearDown() {
97 browser_.reset(); 97 browser_.reset();
98 browser_window_.reset(); 98 browser_window_.reset();
99 ExtensionServiceTestBase::TearDown(); 99 ExtensionServiceTestBase::TearDown();
100 } 100 }
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 function = new ManagementUninstallSelfFunction(); 218 function = new ManagementUninstallSelfFunction();
219 function->set_extension(extension); 219 function->set_extension(extension);
220 EXPECT_TRUE(registry()->enabled_extensions().Contains(extension_id)); 220 EXPECT_TRUE(registry()->enabled_extensions().Contains(extension_id));
221 EXPECT_TRUE(RunFunction(function, uninstall_args)) << function->GetError(); 221 EXPECT_TRUE(RunFunction(function, uninstall_args)) << function->GetError();
222 EXPECT_FALSE(registry()->GetExtensionById(extension_id, 222 EXPECT_FALSE(registry()->GetExtensionById(extension_id,
223 ExtensionRegistry::EVERYTHING)); 223 ExtensionRegistry::EVERYTHING));
224 } 224 }
225 } 225 }
226 226
227 } // namespace extensions 227 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698