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

Side by Side Diff: content/test/content_test_suite.cc

Issue 9950040: Get chrome:// dev tool urls hooked up in content_shell. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « content/shell/shell_main_delegate.cc ('k') | content/test/test_content_client.h » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/test/content_test_suite.h" 5 #include "content/test/content_test_suite.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "content/browser/mock_content_browser_client.h" 9 #include "content/browser/mock_content_browser_client.h"
10 #include "content/browser/notification_service_impl.h" 10 #include "content/browser/notification_service_impl.h"
11 #include "content/public/common/content_client.h" 11 #include "content/public/common/content_client.h"
12 #include "content/public/common/content_paths.h" 12 #include "content/public/common/content_paths.h"
13 #include "content/public/common/url_constants.h"
13 #include "content/test/test_content_client.h" 14 #include "content/test/test_content_client.h"
14 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
15 #include "ui/base/ui_base_paths.h" 16 #include "ui/base/ui_base_paths.h"
16 17
17 #if defined(OS_MACOSX) 18 #if defined(OS_MACOSX)
18 #include "base/mac/scoped_nsautorelease_pool.h" 19 #include "base/mac/scoped_nsautorelease_pool.h"
19 #endif 20 #endif
20 #include "ui/gfx/compositor/compositor_setup.h" 21 #include "ui/gfx/compositor/compositor_setup.h"
21 22
22 namespace { 23 namespace {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 ContentTestSuite::~ContentTestSuite() { 65 ContentTestSuite::~ContentTestSuite() {
65 } 66 }
66 67
67 void ContentTestSuite::Initialize() { 68 void ContentTestSuite::Initialize() {
68 #if defined(OS_MACOSX) 69 #if defined(OS_MACOSX)
69 base::mac::ScopedNSAutoreleasePool autorelease_pool; 70 base::mac::ScopedNSAutoreleasePool autorelease_pool;
70 #endif 71 #endif
71 72
72 base::TestSuite::Initialize(); 73 base::TestSuite::Initialize();
73 74
75 TestContentClient client_for_init;
76 content::SetContentClient(&client_for_init);
77 content::RegisterContentSchemes(false);
78 content::SetContentClient(NULL);
79
74 content::RegisterPathProvider(); 80 content::RegisterPathProvider();
75 ui::RegisterPathProvider(); 81 ui::RegisterPathProvider();
76 82
77 // Mock out the compositor on platforms that use it. 83 // Mock out the compositor on platforms that use it.
78 ui::SetupTestCompositor(); 84 ui::SetupTestCompositor();
79 85
80 testing::TestEventListeners& listeners = 86 testing::TestEventListeners& listeners =
81 testing::UnitTest::GetInstance()->listeners(); 87 testing::UnitTest::GetInstance()->listeners();
82 listeners.Append(new TestContentClientInitializer); 88 listeners.Append(new TestContentClientInitializer);
83 } 89 }
84 90
OLDNEW
« no previous file with comments | « content/shell/shell_main_delegate.cc ('k') | content/test/test_content_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698