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

Side by Side Diff: content/public/test/browser_test_base.h

Issue 14304004: Convert a bunch of test_shell_tests to content_browsertests. These are tests that depend on loading… (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/content_tests.gypi ('k') | content/public/test/browser_test_base.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 #ifndef CONTENT_PUBLIC_TEST_BROWSER_TEST_BASE_H_ 5 #ifndef CONTENT_PUBLIC_TEST_BROWSER_TEST_BASE_H_
6 #define CONTENT_PUBLIC_TEST_BROWSER_TEST_BASE_H_ 6 #define CONTENT_PUBLIC_TEST_BROWSER_TEST_BASE_H_
7 7
8 #include "base/callback.h"
8 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "net/test/test_server.h"
9 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
10 #include "net/test/test_server.h"
11 12
12 class CommandLine; 13 class CommandLine;
13 14
14 namespace base { 15 namespace base {
15 class FilePath; 16 class FilePath;
16 } 17 }
17 18
18 namespace content { 19 namespace content {
19 20
20 class BrowserTestBase : public testing::Test { 21 class BrowserTestBase : public testing::Test {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 #endif 76 #endif
76 77
77 // This function is meant only for classes that directly derive from this 78 // This function is meant only for classes that directly derive from this
78 // class to construct the test server in their constructor. They might need to 79 // class to construct the test server in their constructor. They might need to
79 // call this after setting up the paths. Actual test cases should never call 80 // call this after setting up the paths. Actual test cases should never call
80 // this. 81 // this.
81 // |test_server_base| is the path, relative to src, to give to the test HTTP 82 // |test_server_base| is the path, relative to src, to give to the test HTTP
82 // server. 83 // server.
83 void CreateTestServer(const base::FilePath& test_server_base); 84 void CreateTestServer(const base::FilePath& test_server_base);
84 85
86 // When the test is running in --single-process mode, runs the given task on
87 // the in-process renderer thread. A nested message loop is run until it
88 // returns.
89 void PostTaskToInProcessRendererAndWait(const base::Closure& task);
90
85 private: 91 private:
86 void ProxyRunTestOnMainThreadLoop(); 92 void ProxyRunTestOnMainThreadLoop();
87 93
88 // Testing server, started on demand. 94 // Testing server, started on demand.
89 scoped_ptr<net::TestServer> test_server_; 95 scoped_ptr<net::TestServer> test_server_;
90 96
91 #if defined(OS_POSIX) 97 #if defined(OS_POSIX)
92 bool handle_sigterm_; 98 bool handle_sigterm_;
93 #endif 99 #endif
94 }; 100 };
95 101
96 } // namespace content 102 } // namespace content
97 103
98 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_BASE_H_ 104 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_BASE_H_
OLDNEW
« no previous file with comments | « content/content_tests.gypi ('k') | content/public/test/browser_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698