OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |