Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(500)

Side by Side Diff: chrome_frame/test/mock_ie_event_sink_test.cc

Issue 10007043: Attempt to fix ChromeFrameTestWithWebServer tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move snapshot fn into ui_test_utils_win.cc Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "base/win/scoped_variant.h" 10 #include "base/win/scoped_variant.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
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() : server_mock_(1337, L"127.0.0.1", 181 MockIEEventSinkTest::MockIEEventSinkTest() : server_mock_(1337, L"127.0.0.1",
182 GetTestDataFolder()) { 182 GetTestDataFolder()) {
183 loop_.set_snapshot_on_timeout(true);
183 EXPECT_CALL(server_mock_, Get(_, StrCaseEq(L"/favicon.ico"), _)) 184 EXPECT_CALL(server_mock_, Get(_, StrCaseEq(L"/favicon.ico"), _))
184 .WillRepeatedly(SendFast("HTTP/1.1 404 Not Found", "")); 185 .WillRepeatedly(SendFast("HTTP/1.1 404 Not Found", ""));
185 } 186 }
186 187
187 MockIEEventSinkTest::MockIEEventSinkTest(int port, const std::wstring& address, 188 MockIEEventSinkTest::MockIEEventSinkTest(int port, const std::wstring& address,
188 const FilePath& root_dir) 189 const FilePath& root_dir)
189 : server_mock_(port, address, root_dir) { 190 : server_mock_(port, address, root_dir) {
191 loop_.set_snapshot_on_timeout(true);
190 EXPECT_CALL(server_mock_, Get(_, StrCaseEq(L"/favicon.ico"), _)) 192 EXPECT_CALL(server_mock_, Get(_, StrCaseEq(L"/favicon.ico"), _))
191 .WillRepeatedly(SendFast("HTTP/1.1 404 Not Found", "")); 193 .WillRepeatedly(SendFast("HTTP/1.1 404 Not Found", ""));
192 } 194 }
193 195
194 void MockIEEventSinkTest::LaunchIEAndNavigate(const std::wstring& url) { 196 void MockIEEventSinkTest::LaunchIEAndNavigate(const std::wstring& url) {
195 LaunchIENavigateAndLoop(url, kChromeFrameLongNavigationTimeout); 197 LaunchIENavigateAndLoop(url, kChromeFrameLongNavigationTimeout);
196 } 198 }
197 199
198 void MockIEEventSinkTest::LaunchIENavigateAndLoop(const std::wstring& url, 200 void MockIEEventSinkTest::LaunchIENavigateAndLoop(const std::wstring& url,
199 base::TimeDelta timeout) { 201 base::TimeDelta timeout) {
(...skipping 25 matching lines...) Expand all
225 const std::wstring& relative_path) { 227 const std::wstring& relative_path) {
226 return server_mock_.root_dir().Append(relative_path); 228 return server_mock_.root_dir().Append(relative_path);
227 } 229 }
228 230
229 std::wstring MockIEEventSinkTest::GetTestUrl( 231 std::wstring MockIEEventSinkTest::GetTestUrl(
230 const std::wstring& relative_path) { 232 const std::wstring& relative_path) {
231 return server_mock_.Resolve(relative_path.c_str()); 233 return server_mock_.Resolve(relative_path.c_str());
232 } 234 }
233 235
234 } // namespace chrome_frame_test 236 } // namespace chrome_frame_test
OLDNEW
« no previous file with comments | « chrome_frame/test/chrome_frame_test_utils.cc ('k') | chrome_frame/test/net/fake_external_tab.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698