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

Side by Side Diff: chrome/browser/extensions/api/developer_private/developer_private_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/files/file_util.h" 5 #include "base/files/file_util.h"
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/extensions/api/developer_private/developer_private_api. h" 8 #include "chrome/browser/extensions/api/developer_private/developer_private_api. h"
9 #include "chrome/browser/extensions/error_console/error_console.h" 9 #include "chrome/browser/extensions/error_console/error_console.h"
10 #include "chrome/browser/extensions/extension_function_test_utils.h" 10 #include "chrome/browser/extensions/extension_function_test_utils.h"
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 } 215 }
216 216
217 return testing::AssertionSuccess(); 217 return testing::AssertionSuccess();
218 } 218 }
219 219
220 void DeveloperPrivateApiUnitTest::SetUp() { 220 void DeveloperPrivateApiUnitTest::SetUp() {
221 ExtensionServiceTestBase::SetUp(); 221 ExtensionServiceTestBase::SetUp();
222 InitializeEmptyExtensionService(); 222 InitializeEmptyExtensionService();
223 223
224 browser_window_.reset(new TestBrowserWindow()); 224 browser_window_.reset(new TestBrowserWindow());
225 Browser::CreateParams params(profile(), chrome::HOST_DESKTOP_TYPE_NATIVE); 225 Browser::CreateParams params(profile(), ui::HOST_DESKTOP_TYPE_NATIVE);
226 params.type = Browser::TYPE_TABBED; 226 params.type = Browser::TYPE_TABBED;
227 params.window = browser_window_.get(); 227 params.window = browser_window_.get();
228 browser_.reset(new Browser(params)); 228 browser_.reset(new Browser(params));
229 229
230 // Allow the API to be created. 230 // Allow the API to be created.
231 EventRouterFactory::GetInstance()->SetTestingFactory(profile(), 231 EventRouterFactory::GetInstance()->SetTestingFactory(profile(),
232 &BuildEventRouter); 232 &BuildEventRouter);
233 233
234 DeveloperPrivateAPI::GetFactoryInstance()->SetTestingFactory( 234 DeveloperPrivateAPI::GetFactoryInstance()->SetTestingFactory(
235 profile(), &BuildAPI); 235 profile(), &BuildAPI);
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 args = ListBuilder() 540 args = ListBuilder()
541 .Append(DictionaryBuilder().Set("extensionId", extension->id())) 541 .Append(DictionaryBuilder().Set("extensionId", extension->id()))
542 .Build(); 542 .Build();
543 function = new api::DeveloperPrivateDeleteExtensionErrorsFunction(); 543 function = new api::DeveloperPrivateDeleteExtensionErrorsFunction();
544 EXPECT_TRUE(RunFunction(function, *args)) << function->GetError(); 544 EXPECT_TRUE(RunFunction(function, *args)) << function->GetError();
545 // No more errors! 545 // No more errors!
546 EXPECT_TRUE(error_console->GetErrorsForExtension(extension->id()).empty()); 546 EXPECT_TRUE(error_console->GetErrorsForExtension(extension->id()).empty());
547 } 547 }
548 548
549 } // namespace extensions 549 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698