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 #include "chrome_frame/test/mock_ie_event_sink_test.h" | 5 #include "chrome_frame/test/mock_ie_event_sink_test.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "base/win/scoped_variant.h" | 10 #include "base/win/scoped_variant.h" |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 EXPECT_EQ(VT_I4, result.type()); | 172 EXPECT_EQ(VT_I4, result.type()); |
173 if (result.type() == VT_I4) { | 173 if (result.type() == VT_I4) { |
174 EXPECT_EQ(ready_state, static_cast<int>(V_I4(&result))); | 174 EXPECT_EQ(ready_state, static_cast<int>(V_I4(&result))); |
175 } | 175 } |
176 } | 176 } |
177 } | 177 } |
178 } | 178 } |
179 | 179 |
180 // MockIEEventSinkTest methods | 180 // MockIEEventSinkTest methods |
181 MockIEEventSinkTest::MockIEEventSinkTest() | 181 MockIEEventSinkTest::MockIEEventSinkTest() |
182 : server_mock_(1337, ASCIIToWide(chrome_frame_test::GetLocalIPv4Address()), | 182 : server_mock_(1337, |
| 183 base::ASCIIToWide(chrome_frame_test::GetLocalIPv4Address()), |
183 GetTestDataFolder()) { | 184 GetTestDataFolder()) { |
184 loop_.set_snapshot_on_timeout(true); | 185 loop_.set_snapshot_on_timeout(true); |
185 EXPECT_CALL(server_mock_, Get(_, StrCaseEq(L"/favicon.ico"), _)) | 186 EXPECT_CALL(server_mock_, Get(_, StrCaseEq(L"/favicon.ico"), _)) |
186 .WillRepeatedly(SendFast("HTTP/1.1 404 Not Found", "")); | 187 .WillRepeatedly(SendFast("HTTP/1.1 404 Not Found", "")); |
187 } | 188 } |
188 | 189 |
189 MockIEEventSinkTest::MockIEEventSinkTest(int port, const std::wstring& address, | 190 MockIEEventSinkTest::MockIEEventSinkTest(int port, const std::wstring& address, |
190 const base::FilePath& root_dir) | 191 const base::FilePath& root_dir) |
191 : server_mock_(port, address, root_dir) { | 192 : server_mock_(port, address, root_dir) { |
192 loop_.set_snapshot_on_timeout(true); | 193 loop_.set_snapshot_on_timeout(true); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 const std::wstring& relative_path) { | 229 const std::wstring& relative_path) { |
229 return server_mock_.root_dir().Append(relative_path); | 230 return server_mock_.root_dir().Append(relative_path); |
230 } | 231 } |
231 | 232 |
232 std::wstring MockIEEventSinkTest::GetTestUrl( | 233 std::wstring MockIEEventSinkTest::GetTestUrl( |
233 const std::wstring& relative_path) { | 234 const std::wstring& relative_path) { |
234 return server_mock_.Resolve(relative_path.c_str()); | 235 return server_mock_.Resolve(relative_path.c_str()); |
235 } | 236 } |
236 | 237 |
237 } // namespace chrome_frame_test | 238 } // namespace chrome_frame_test |
OLD | NEW |