| OLD | NEW |
| 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_TEST_BROWSER_TEST_BASE_H_ | 5 #ifndef CONTENT_TEST_BROWSER_TEST_BASE_H_ |
| 6 #define CONTENT_TEST_BROWSER_TEST_BASE_H_ | 6 #define CONTENT_TEST_BROWSER_TEST_BASE_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/message_loop.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| 10 #include "net/test/test_server.h" | 11 #include "net/test/test_server.h" |
| 11 | 12 |
| 12 class CommandLine; | 13 class CommandLine; |
| 13 | 14 |
| 15 #if defined(USE_AURA) |
| 16 namespace aura { |
| 17 namespace test { |
| 18 class AuraTestHelper; |
| 19 } |
| 20 } |
| 21 #endif |
| 22 |
| 14 class BrowserTestBase : public testing::Test { | 23 class BrowserTestBase : public testing::Test { |
| 15 public: | 24 public: |
| 16 BrowserTestBase(); | 25 BrowserTestBase(); |
| 17 virtual ~BrowserTestBase(); | 26 virtual ~BrowserTestBase(); |
| 18 | 27 |
| 19 // We do this so we can be used in a Task. | 28 // We do this so we can be used in a Task. |
| 20 void AddRef() {} | 29 void AddRef() {} |
| 21 void Release() {} | 30 void Release() {} |
| 22 | 31 |
| 23 // Configures everything for an in process browser test, then invokes | 32 // Configures everything for an in process browser test, then invokes |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 // this. | 75 // this. |
| 67 // |test_server_base| is the path, relative to src, to give to the test HTTP | 76 // |test_server_base| is the path, relative to src, to give to the test HTTP |
| 68 // server. | 77 // server. |
| 69 void CreateTestServer(const char* test_server_base); | 78 void CreateTestServer(const char* test_server_base); |
| 70 | 79 |
| 71 private: | 80 private: |
| 72 void ProxyRunTestOnMainThreadLoop(); | 81 void ProxyRunTestOnMainThreadLoop(); |
| 73 | 82 |
| 74 // Testing server, started on demand. | 83 // Testing server, started on demand. |
| 75 scoped_ptr<net::TestServer> test_server_; | 84 scoped_ptr<net::TestServer> test_server_; |
| 85 |
| 86 #if defined(USE_AURA) |
| 87 MessageLoopForUI ui_loop_; |
| 88 scoped_ptr<aura::test::AuraTestHelper> aura_test_helper_; |
| 89 #endif |
| 76 }; | 90 }; |
| 77 | 91 |
| 78 #endif // CONTENT_TEST_BROWSER_TEST_BASE_H_ | 92 #endif // CONTENT_TEST_BROWSER_TEST_BASE_H_ |
| OLD | NEW |