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

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

Issue 13409003: Hide ContentClient getters from embedders so that they they don't reuse content's embedder API. The… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 7 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/test/content_browser_test.cc ('k') | content/test/webrtc_audio_device_test.cc » ('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/public/test/test_launcher.h" 5 #include "content/public/test/test_launcher.h"
6 6
7 #include "base/base_paths.h" 7 #include "base/base_paths.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 18 matching lines...) Expand all
29 29
30 namespace content { 30 namespace content {
31 31
32 class ContentShellTestSuiteInitializer 32 class ContentShellTestSuiteInitializer
33 : public testing::EmptyTestEventListener { 33 : public testing::EmptyTestEventListener {
34 public: 34 public:
35 ContentShellTestSuiteInitializer() { 35 ContentShellTestSuiteInitializer() {
36 } 36 }
37 37
38 virtual void OnTestStart(const testing::TestInfo& test_info) OVERRIDE { 38 virtual void OnTestStart(const testing::TestInfo& test_info) OVERRIDE {
39 DCHECK(!GetContentClient());
40 content_client_.reset(new ShellContentClient); 39 content_client_.reset(new ShellContentClient);
41 browser_content_client_.reset(new ShellContentBrowserClient()); 40 browser_content_client_.reset(new ShellContentBrowserClient());
42 content_client_->set_browser_for_testing(browser_content_client_.get());
43 SetContentClient(content_client_.get()); 41 SetContentClient(content_client_.get());
42 SetBrowserClientForTesting(browser_content_client_.get());
44 } 43 }
45 44
46 virtual void OnTestEnd(const testing::TestInfo& test_info) OVERRIDE { 45 virtual void OnTestEnd(const testing::TestInfo& test_info) OVERRIDE {
47 DCHECK_EQ(content_client_.get(), GetContentClient());
48 browser_content_client_.reset(); 46 browser_content_client_.reset();
49 content_client_.reset(); 47 content_client_.reset();
50 SetContentClient(NULL); 48 SetContentClient(NULL);
51 } 49 }
52 50
53 private: 51 private:
54 scoped_ptr<ShellContentClient> content_client_; 52 scoped_ptr<ShellContentClient> content_client_;
55 scoped_ptr<ShellContentBrowserClient> browser_content_client_; 53 scoped_ptr<ShellContentBrowserClient> browser_content_client_;
56 54
57 DISALLOW_COPY_AND_ASSIGN(ContentShellTestSuiteInitializer); 55 DISALLOW_COPY_AND_ASSIGN(ContentShellTestSuiteInitializer);
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 private: 125 private:
128 DISALLOW_COPY_AND_ASSIGN(ContentTestLauncherDelegate); 126 DISALLOW_COPY_AND_ASSIGN(ContentTestLauncherDelegate);
129 }; 127 };
130 128
131 } // namespace content 129 } // namespace content
132 130
133 int main(int argc, char** argv) { 131 int main(int argc, char** argv) {
134 content::ContentTestLauncherDelegate launcher_delegate; 132 content::ContentTestLauncherDelegate launcher_delegate;
135 return LaunchTests(&launcher_delegate, argc, argv); 133 return LaunchTests(&launcher_delegate, argc, argv);
136 } 134 }
OLDNEW
« no previous file with comments | « content/test/content_browser_test.cc ('k') | content/test/webrtc_audio_device_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698