OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/win/scoped_handle.h" | 13 #include "base/win/scoped_handle.h" |
14 #include "chrome/app/scoped_ole_initializer.h" | 14 #include "chrome/app/scoped_ole_initializer.h" |
15 #include "chrome/browser/browser_process_impl.h" | 15 #include "chrome/browser/browser_process_impl.h" |
16 #include "chrome_frame/test/net/process_singleton_subclass.h" | 16 #include "chrome_frame/test/net/process_singleton_subclass.h" |
17 #include "chrome_frame/test/net/test_automation_provider.h" | 17 #include "chrome_frame/test/net/test_automation_provider.h" |
18 #include "chrome_frame/test/test_server.h" | 18 #include "chrome_frame/test/test_server.h" |
19 #include "chrome_frame/test_utils.h" | 19 #include "chrome_frame/test_utils.h" |
20 #include "content/public/browser/browser_thread.h" | 20 #include "content/test/test_browser_thread.h" |
21 #include "net/base/net_test_suite.h" | 21 #include "net/base/net_test_suite.h" |
22 | 22 |
23 class ProcessSingleton; | 23 class ProcessSingleton; |
24 | 24 |
25 namespace content { | 25 namespace content { |
26 class NotificationService; | 26 class NotificationService; |
27 } | 27 } |
28 | 28 |
29 class FakeExternalTab { | 29 class FakeExternalTab { |
30 public: | 30 public: |
31 FakeExternalTab(); | 31 FakeExternalTab(); |
32 virtual ~FakeExternalTab(); | 32 virtual ~FakeExternalTab(); |
33 | 33 |
34 virtual void Initialize(); | 34 virtual void Initialize(); |
| 35 virtual void InitializePostThreadsCreated(); |
35 virtual void Shutdown(); | 36 virtual void Shutdown(); |
36 | 37 |
37 const FilePath& user_data() const { | 38 const FilePath& user_data() const { |
38 return user_data_dir_; | 39 return user_data_dir_; |
39 } | 40 } |
40 | 41 |
41 MessageLoopForUI* ui_loop() { | 42 MessageLoopForUI* ui_loop() { |
42 return &loop_; | 43 return &loop_; |
43 } | 44 } |
44 | 45 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 base::win::ScopedHandle test_thread_; | 99 base::win::ScopedHandle test_thread_; |
99 DWORD test_thread_id_; | 100 DWORD test_thread_id_; |
100 | 101 |
101 scoped_ptr<test_server::SimpleWebServer> test_http_server_; | 102 scoped_ptr<test_server::SimpleWebServer> test_http_server_; |
102 test_server::SimpleResponse chrome_frame_html_; | 103 test_server::SimpleResponse chrome_frame_html_; |
103 | 104 |
104 // The fake chrome instance. This instance owns the UI message loop | 105 // The fake chrome instance. This instance owns the UI message loop |
105 // on the main thread. | 106 // on the main thread. |
106 FakeExternalTab fake_chrome_; | 107 FakeExternalTab fake_chrome_; |
107 scoped_ptr<ProcessSingletonSubclass> pss_subclass_; | 108 scoped_ptr<ProcessSingletonSubclass> pss_subclass_; |
108 scoped_ptr<content::DeprecatedBrowserThread> main_thread_; | 109 scoped_ptr<content::TestBrowserThread> main_thread_; |
109 ScopedChromeFrameRegistrar registrar_; | 110 ScopedChromeFrameRegistrar registrar_; |
110 int test_result_; | 111 int test_result_; |
| 112 |
| 113 // TODO(joi): This should be fixed so that this test executable uses |
| 114 // content::BrowserMainParts. As it stands it is a horrible hack. |
| 115 scoped_ptr<content::TestBrowserThread> db_thread_; |
| 116 scoped_ptr<content::TestBrowserThread> file_thread_; |
| 117 scoped_ptr<content::TestBrowserThread> io_thread_; |
111 }; | 118 }; |
112 | 119 |
113 #endif // CHROME_FRAME_TEST_NET_FAKE_EXTERNAL_TAB_H_ | 120 #endif // CHROME_FRAME_TEST_NET_FAKE_EXTERNAL_TAB_H_ |
OLD | NEW |