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_TEST_WITH_WEB_SERVER_H_ | 5 #ifndef CHROME_FRAME_TEST_TEST_WITH_WEB_SERVER_H_ |
6 #define CHROME_FRAME_TEST_TEST_WITH_WEB_SERVER_H_ | 6 #define CHROME_FRAME_TEST_TEST_WITH_WEB_SERVER_H_ |
7 | 7 |
8 #include <windows.h> | 8 #include <windows.h> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/scoped_temp_dir.h" | 11 #include "base/files/scoped_temp_dir.h" |
12 #include "base/string_util.h" | 12 #include "base/string_util.h" |
13 #include "base/stringprintf.h" | 13 #include "base/stringprintf.h" |
14 #include "base/utf_string_conversions.h" | 14 #include "base/utf_string_conversions.h" |
15 #include "base/win/scoped_handle.h" | 15 #include "base/win/scoped_handle.h" |
16 #include "chrome_frame/chrome_tab.h" | 16 #include "chrome_frame/chrome_tab.h" |
17 #include "chrome_frame/test/chrome_frame_test_utils.h" | 17 #include "chrome_frame/test/chrome_frame_test_utils.h" |
18 #include "chrome_frame/test/test_server.h" | 18 #include "chrome_frame/test/test_server.h" |
| 19 #include "testing/gmock/include/gmock/gmock.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
20 #include "testing/gmock/include/gmock/gmock.h" | |
21 | 21 |
22 // Specifies the invocation method for CF. | 22 // Specifies the invocation method for CF. |
23 class CFInvocation { | 23 class CFInvocation { |
24 public: | 24 public: |
25 enum Type { | 25 enum Type { |
26 NONE = 0, | 26 NONE = 0, |
27 META_TAG, | 27 META_TAG, |
28 HTTP_HEADER | 28 HTTP_HEADER |
29 }; | 29 }; |
30 | 30 |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 virtual void TearDown() OVERRIDE; | 231 virtual void TearDown() OVERRIDE; |
232 | 232 |
233 // The on-disk path to our html test files. | 233 // The on-disk path to our html test files. |
234 static FilePath test_file_path_; | 234 static FilePath test_file_path_; |
235 static FilePath results_dir_; | 235 static FilePath results_dir_; |
236 static FilePath CFInstall_path_; | 236 static FilePath CFInstall_path_; |
237 static FilePath CFInstance_path_; | 237 static FilePath CFInstance_path_; |
238 static FilePath chrome_user_data_dir_; | 238 static FilePath chrome_user_data_dir_; |
239 | 239 |
240 // The user data directory used for Chrome instances. | 240 // The user data directory used for Chrome instances. |
241 static ScopedTempDir temp_dir_; | 241 static base::ScopedTempDir temp_dir_; |
242 | 242 |
243 // The web server from which we serve the web! | 243 // The web server from which we serve the web! |
244 static chrome_frame_test::TimedMsgLoop* loop_; | 244 static chrome_frame_test::TimedMsgLoop* loop_; |
245 static std::string local_address_; | 245 static std::string local_address_; |
246 static testing::StrictMock<MockWebServerListener>* listener_mock_; | 246 static testing::StrictMock<MockWebServerListener>* listener_mock_; |
247 static testing::StrictMock<MockWebServer>* server_mock_; | 247 static testing::StrictMock<MockWebServer>* server_mock_; |
248 | 248 |
249 BrowserKind browser_; | 249 BrowserKind browser_; |
250 base::win::ScopedHandle browser_handle_; | 250 base::win::ScopedHandle browser_handle_; |
251 }; | 251 }; |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 // Same as above except that the response does not include the no-cache header. | 363 // Same as above except that the response does not include the no-cache header. |
364 ACTION_P2(SendAllowCacheResponse, server, invocation) { | 364 ACTION_P2(SendAllowCacheResponse, server, invocation) { |
365 server->SendResponseHelper(arg0, arg1, invocation, false); | 365 server->SendResponseHelper(arg0, arg1, invocation, false); |
366 } | 366 } |
367 | 367 |
368 ACTION_P2(HandlePostedResponseHelper, server, invocation) { | 368 ACTION_P2(HandlePostedResponseHelper, server, invocation) { |
369 server->HandlePostedResponse(arg0, arg2); | 369 server->HandlePostedResponse(arg0, arg2); |
370 } | 370 } |
371 | 371 |
372 #endif // CHROME_FRAME_TEST_TEST_WITH_WEB_SERVER_H_ | 372 #endif // CHROME_FRAME_TEST_TEST_WITH_WEB_SERVER_H_ |
OLD | NEW |