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

Side by Side Diff: extensions/browser/extensions_test.cc

Issue 2688593002: WIP: Towards merging OffscreenCanvas and Mus code
Patch Set: Fix reflector unit test Created 3 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
« no previous file with comments | « extensions/browser/extensions_test.h ('k') | ui/aura/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/browser/extensions_test.h" 5 #include "extensions/browser/extensions_test.h"
6 6
7 #include "components/keyed_service/content/browser_context_dependency_manager.h" 7 #include "components/keyed_service/content/browser_context_dependency_manager.h"
8 #include "content/public/browser/content_browser_client.h" 8 #include "content/public/browser/content_browser_client.h"
9 #include "content/public/common/content_client.h" 9 #include "content/public/common/content_client.h"
10 #include "content/public/test/test_browser_context.h" 10 #include "content/public/test/test_browser_context.h"
(...skipping 24 matching lines...) Expand all
35 ExtensionsTest::~ExtensionsTest() { 35 ExtensionsTest::~ExtensionsTest() {
36 ExtensionsBrowserClient::Set(nullptr); 36 ExtensionsBrowserClient::Set(nullptr);
37 content::SetBrowserClientForTesting(nullptr); 37 content::SetBrowserClientForTesting(nullptr);
38 content::SetUtilityClientForTesting(nullptr); 38 content::SetUtilityClientForTesting(nullptr);
39 } 39 }
40 40
41 void ExtensionsTest::SetUp() { 41 void ExtensionsTest::SetUp() {
42 // Crashing here? Don't use this class in Chrome's unit_tests. See header. 42 // Crashing here? Don't use this class in Chrome's unit_tests. See header.
43 BrowserContextDependencyManager::GetInstance() 43 BrowserContextDependencyManager::GetInstance()
44 ->CreateBrowserContextServicesForTest(browser_context_.get()); 44 ->CreateBrowserContextServicesForTest(browser_context_.get());
45
46 rvh_test_enabler_ = base::MakeUnique<content::RenderViewHostTestEnabler>();
45 } 47 }
46 48
47 void ExtensionsTest::TearDown() { 49 void ExtensionsTest::TearDown() {
48 // Allows individual tests to have BrowserContextKeyedServiceFactory objects 50 // Allows individual tests to have BrowserContextKeyedServiceFactory objects
49 // as member variables instead of singletons. The individual services will be 51 // as member variables instead of singletons. The individual services will be
50 // cleaned up before the factories are destroyed. 52 // cleaned up before the factories are destroyed.
51 BrowserContextDependencyManager::GetInstance()->DestroyBrowserContextServices( 53 BrowserContextDependencyManager::GetInstance()->DestroyBrowserContextServices(
52 browser_context_.get()); 54 browser_context_.get());
53 extensions_browser_client_.reset(); 55 extensions_browser_client_.reset();
54 browser_context_.reset(); 56 browser_context_.reset();
55 } 57 }
56 58
57 } // namespace extensions 59 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/extensions_test.h ('k') | ui/aura/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698