| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "chrome_frame/test/test_with_web_server.h" | 5 #include "chrome_frame/test/test_with_web_server.h" |
| 6 | 6 |
| 7 #include "base/base_paths.h" | 7 #include "base/base_paths.h" |
| 8 #include "base/file_version_info.h" | 8 #include "base/file_version_info.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "base/stringprintf.h" | 10 #include "base/stringprintf.h" |
| (...skipping 1222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1233 return get_requests_; | 1233 return get_requests_; |
| 1234 } | 1234 } |
| 1235 | 1235 |
| 1236 protected: | 1236 protected: |
| 1237 mutable bool is_post_; | 1237 mutable bool is_post_; |
| 1238 size_t post_requests_; | 1238 size_t post_requests_; |
| 1239 size_t get_requests_; | 1239 size_t get_requests_; |
| 1240 }; | 1240 }; |
| 1241 | 1241 |
| 1242 EXPECT_CALL(win_observer_mock, OnWindowOpen(_)) | 1242 EXPECT_CALL(win_observer_mock, OnWindowOpen(_)) |
| 1243 .Times(testing::AtMost(1)) |
| 1243 .WillOnce(chrome_frame_test::DoCloseWindow()); | 1244 .WillOnce(chrome_frame_test::DoCloseWindow()); |
| 1244 | 1245 |
| 1245 EXPECT_CALL(win_observer_mock, OnWindowClose(_)) | 1246 EXPECT_CALL(win_observer_mock, OnWindowClose(_)) |
| 1247 .Times(testing::AtMost(1)) |
| 1246 .WillOnce(QUIT_LOOP(loop_)); | 1248 .WillOnce(QUIT_LOOP(loop_)); |
| 1247 | 1249 |
| 1248 SimpleWebServerTest server(46664); | 1250 SimpleWebServerTest server(46664); |
| 1249 CustomResponse* response = new CustomResponse("/form.html"); | 1251 CustomResponse* response = new CustomResponse("/form.html"); |
| 1250 server.web_server()->AddResponse(response); | 1252 server.web_server()->AddResponse(response); |
| 1251 | 1253 |
| 1252 std::wstring url(server.FormatHttpPath(L"form.html")); | 1254 std::wstring url(server.FormatHttpPath(L"form.html")); |
| 1253 | 1255 |
| 1254 ASSERT_TRUE(LaunchBrowser(IE, url.c_str())); | 1256 ASSERT_TRUE(LaunchBrowser(IE, url.c_str())); |
| 1255 loop_.RunFor(kChromeFrameLongNavigationTimeoutInSeconds); | 1257 loop_.RunFor(kChromeFrameLongNavigationTimeoutInSeconds); |
| 1256 | 1258 |
| 1257 EXPECT_EQ(1, response->get_request_count()); | 1259 EXPECT_EQ(1, response->get_request_count()); |
| 1258 EXPECT_EQ(1, response->post_request_count()); | 1260 EXPECT_EQ(1, response->post_request_count()); |
| 1259 } | 1261 } |
| 1260 | 1262 |
| OLD | NEW |