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

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

Issue 10826311: Move the corresponding cc files from content\test to be alongside their headers in content\public\t… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 4 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/test_utils.cc ('k') | content/test/web_contents_tester.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "content/public/test/unittest_test_suite.h"
6
7 #include "base/logging.h"
8 #include "base/rand_util.h"
9 #include "base/test/test_suite.h"
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h"
11 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebKitPlatfo rmSupport.h"
12
13 namespace content {
14
15 // A stubbed out WebKit platform support impl.
16 class UnitTestTestSuite::UnitTestWebKitPlatformSupport
17 : public WebKit::WebKitPlatformSupport {
18 public:
19 UnitTestWebKitPlatformSupport() {}
20 virtual ~UnitTestWebKitPlatformSupport() {}
21 virtual void cryptographicallyRandomValues(unsigned char* buffer,
22 size_t length) OVERRIDE {
23 base::RandBytes(buffer, length);
24 }
25 virtual const unsigned char* getTraceCategoryEnabledFlag(
26 const char* categoryName) {
27 // Causes tracing macros to be disabled.
28 static const unsigned char kEnabled = 0;
29 return &kEnabled;
30 }
31 };
32
33 UnitTestTestSuite::UnitTestTestSuite(base::TestSuite* test_suite)
34 : test_suite_(test_suite) {
35 DCHECK(test_suite);
36 webkit_platform_support_.reset(new UnitTestWebKitPlatformSupport);
37 WebKit::initialize(webkit_platform_support_.get());
38 }
39
40 UnitTestTestSuite::~UnitTestTestSuite() {
41 WebKit::shutdown();
42 }
43
44 int UnitTestTestSuite::Run() {
45 return test_suite_->Run();
46 }
47
48 } // namespace content
OLDNEW
« no previous file with comments | « content/test/test_utils.cc ('k') | content/test/web_contents_tester.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698