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

Side by Side Diff: chrome/browser/extensions/api/developer_private/developer_private_api_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 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 <utility> 5 #include <utility>
6 6
7 #include "base/files/file_util.h" 7 #include "base/files/file_util.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 } 219 }
220 220
221 return testing::AssertionSuccess(); 221 return testing::AssertionSuccess();
222 } 222 }
223 223
224 void DeveloperPrivateApiUnitTest::SetUp() { 224 void DeveloperPrivateApiUnitTest::SetUp() {
225 ExtensionServiceTestBase::SetUp(); 225 ExtensionServiceTestBase::SetUp();
226 InitializeEmptyExtensionService(); 226 InitializeEmptyExtensionService();
227 227
228 browser_window_.reset(new TestBrowserWindow()); 228 browser_window_.reset(new TestBrowserWindow());
229 Browser::CreateParams params(profile(), chrome::HOST_DESKTOP_TYPE_NATIVE); 229 Browser::CreateParams params(profile());
230 params.type = Browser::TYPE_TABBED; 230 params.type = Browser::TYPE_TABBED;
231 params.window = browser_window_.get(); 231 params.window = browser_window_.get();
232 browser_.reset(new Browser(params)); 232 browser_.reset(new Browser(params));
233 233
234 // Allow the API to be created. 234 // Allow the API to be created.
235 EventRouterFactory::GetInstance()->SetTestingFactory(profile(), 235 EventRouterFactory::GetInstance()->SetTestingFactory(profile(),
236 &BuildEventRouter); 236 &BuildEventRouter);
237 237
238 DeveloperPrivateAPI::GetFactoryInstance()->SetTestingFactory( 238 DeveloperPrivateAPI::GetFactoryInstance()->SetTestingFactory(
239 profile(), &BuildAPI); 239 profile(), &BuildAPI);
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 .Append(std::move( 547 .Append(std::move(
548 DictionaryBuilder().Set("extensionId", extension->id()))) 548 DictionaryBuilder().Set("extensionId", extension->id())))
549 .Build(); 549 .Build();
550 function = new api::DeveloperPrivateDeleteExtensionErrorsFunction(); 550 function = new api::DeveloperPrivateDeleteExtensionErrorsFunction();
551 EXPECT_TRUE(RunFunction(function, *args)) << function->GetError(); 551 EXPECT_TRUE(RunFunction(function, *args)) << function->GetError();
552 // No more errors! 552 // No more errors!
553 EXPECT_TRUE(error_console->GetErrorsForExtension(extension->id()).empty()); 553 EXPECT_TRUE(error_console->GetErrorsForExtension(extension->id()).empty());
554 } 554 }
555 555
556 } // namespace extensions 556 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698