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 CHROME_FRAME_TEST_NET_FAKE_EXTERNAL_TAB_H_ | 5 #ifndef CHROME_FRAME_TEST_NET_FAKE_EXTERNAL_TAB_H_ |
6 #define CHROME_FRAME_TEST_NET_FAKE_EXTERNAL_TAB_H_ | 6 #define CHROME_FRAME_TEST_NET_FAKE_EXTERNAL_TAB_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/file_path.h" | 11 #include "base/file_path.h" |
12 #include "base/message_loop.h" | 12 #include "base/message_loop.h" |
13 #include "base/process.h" | 13 #include "base/process.h" |
14 #include "base/win/scoped_handle.h" | 14 #include "base/win/scoped_handle.h" |
15 #include "chrome/app/scoped_ole_initializer.h" | 15 #include "chrome/app/scoped_ole_initializer.h" |
16 #include "chrome/browser/browser_process_impl.h" | 16 #include "chrome/browser/browser_process_impl.h" |
17 #include "chrome_frame/test/net/process_singleton_subclass.h" | 17 #include "chrome_frame/test/net/process_singleton_subclass.h" |
18 #include "chrome_frame/test/net/test_automation_provider.h" | 18 #include "chrome_frame/test/net/test_automation_provider.h" |
19 #include "chrome_frame/test/test_server.h" | 19 #include "chrome_frame/test/test_server.h" |
20 #include "chrome_frame/test_utils.h" | 20 #include "chrome_frame/test_utils.h" |
21 #include "content/public/browser/browser_main_parts.h" | 21 #include "content/public/browser/browser_main_parts.h" |
22 #include "content/public/browser/browser_thread.h" | 22 #include "content/public/browser/browser_thread.h" |
23 #include "net/base/net_test_suite.h" | 23 #include "net/base/net_test_suite.h" |
24 #include "net/url_request/url_request_test_util.h" | |
24 | 25 |
25 class FakeBrowserProcessImpl; | 26 class FakeBrowserProcessImpl; |
26 class ProcessSingleton; | 27 class ProcessSingleton; |
27 | 28 |
28 namespace content { | 29 namespace content { |
29 class NotificationService; | 30 class NotificationService; |
30 } | 31 } |
31 | 32 |
32 class FakeExternalTab { | 33 class FakeExternalTab { |
33 public: | 34 public: |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
117 // will be called. | 118 // will be called. |
118 static DWORD WINAPI RunAllUnittests(void* param); | 119 static DWORD WINAPI RunAllUnittests(void* param); |
119 | 120 |
120 static void TakeDownBrowser(CFUrlRequestUnittestRunner* me); | 121 static void TakeDownBrowser(CFUrlRequestUnittestRunner* me); |
121 | 122 |
122 protected: | 123 protected: |
123 base::win::ScopedHandle test_thread_; | 124 base::win::ScopedHandle test_thread_; |
124 bool running_with_crash_service_; | 125 bool running_with_crash_service_; |
125 DWORD test_thread_id_; | 126 DWORD test_thread_id_; |
126 | 127 |
128 scoped_ptr<CustomUrlRequestTestHttpHost> override_http_host_; | |
129 | |
127 scoped_ptr<test_server::SimpleWebServer> test_http_server_; | 130 scoped_ptr<test_server::SimpleWebServer> test_http_server_; |
128 test_server::SimpleResponse chrome_frame_html_; | 131 test_server::SimpleResponse chrome_frame_html_; |
129 | 132 |
130 // The fake chrome instance. | 133 // The fake chrome instance. |
131 scoped_ptr<FakeExternalTab> fake_chrome_; | 134 scoped_ptr<FakeExternalTab> fake_chrome_; |
132 scoped_ptr<ProcessSingletonSubclass> pss_subclass_; | 135 scoped_ptr<ProcessSingletonSubclass> pss_subclass_; |
133 ScopedChromeFrameRegistrar registrar_; | 136 ScopedChromeFrameRegistrar registrar_; |
134 int test_result_; | 137 int test_result_; |
135 | 138 |
139 private: | |
140 // Causes HTTP tests to run over an external address rather than 127.0.0.1. | |
141 // See http://crbug.com/114369 . | |
142 void OverrideHttpHost(); | |
eroman
2012/02/17 21:55:31
[optional] nit: OverrideHttpServerHost.
| |
143 | |
136 DISALLOW_COPY_AND_ASSIGN(CFUrlRequestUnittestRunner); | 144 DISALLOW_COPY_AND_ASSIGN(CFUrlRequestUnittestRunner); |
137 }; | 145 }; |
138 | 146 |
139 #endif // CHROME_FRAME_TEST_NET_FAKE_EXTERNAL_TAB_H_ | 147 #endif // CHROME_FRAME_TEST_NET_FAKE_EXTERNAL_TAB_H_ |
OLD | NEW |