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

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

Issue 11094040: BrowserTestBase::CreateTestServer should accept FilePath (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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
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/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "net/test/test_server.h" 10 #include "net/test/test_server.h"
11 11
12 class CommandLine; 12 class CommandLine;
13 class FilePath;
13 14
14 namespace content { 15 namespace content {
15 16
16 class BrowserTestBase : public testing::Test { 17 class BrowserTestBase : public testing::Test {
17 public: 18 public:
18 BrowserTestBase(); 19 BrowserTestBase();
19 virtual ~BrowserTestBase(); 20 virtual ~BrowserTestBase();
20 21
21 // We do this so we can be used in a Task. 22 // We do this so we can be used in a Task.
22 void AddRef() {} 23 void AddRef() {}
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 handle_sigterm_ = false; 70 handle_sigterm_ = false;
70 } 71 }
71 #endif 72 #endif
72 73
73 // This function is meant only for classes that directly derive from this 74 // This function is meant only for classes that directly derive from this
74 // class to construct the test server in their constructor. They might need to 75 // class to construct the test server in their constructor. They might need to
75 // call this after setting up the paths. Actual test cases should never call 76 // call this after setting up the paths. Actual test cases should never call
76 // this. 77 // this.
77 // |test_server_base| is the path, relative to src, to give to the test HTTP 78 // |test_server_base| is the path, relative to src, to give to the test HTTP
78 // server. 79 // server.
79 void CreateTestServer(const char* test_server_base); 80 void CreateTestServer(const FilePath& test_server_base);
80 81
81 private: 82 private:
82 void ProxyRunTestOnMainThreadLoop(); 83 void ProxyRunTestOnMainThreadLoop();
83 84
84 // Testing server, started on demand. 85 // Testing server, started on demand.
85 scoped_ptr<net::TestServer> test_server_; 86 scoped_ptr<net::TestServer> test_server_;
86 87
87 #if defined(OS_POSIX) 88 #if defined(OS_POSIX)
88 bool handle_sigterm_; 89 bool handle_sigterm_;
89 #endif 90 #endif
90 }; 91 };
91 92
92 } // namespace content 93 } // namespace content
93 94
94 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_BASE_H_ 95 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698