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

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

Issue 10019015: Update uses of TimeDelta in chrome_frame/*. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase onto master. 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
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/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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 EXPECT_CALL(*this, Post(_, testing::HasSubstr(post_suffix), _)) 300 EXPECT_CALL(*this, Post(_, testing::HasSubstr(post_suffix), _))
301 .WillRepeatedly(HandlePostedResponseHelper(this, invocation)); 301 .WillRepeatedly(HandlePostedResponseHelper(this, invocation));
302 } 302 }
303 303
304 void MockWebServer::HandlePostedResponse( 304 void MockWebServer::HandlePostedResponse(
305 test_server::ConfigurableConnection* connection, 305 test_server::ConfigurableConnection* connection,
306 const test_server::Request& request) { 306 const test_server::Request& request) {
307 posted_result_ = request.content(); 307 posted_result_ = request.content();
308 if (posted_result_ == expected_result_) { 308 if (posted_result_ == expected_result_) {
309 MessageLoop::current()->PostDelayedTask(FROM_HERE, 309 MessageLoop::current()->PostDelayedTask(FROM_HERE,
310 MessageLoop::QuitClosure(), 310 MessageLoop::QuitClosure(), base::TimeDelta::FromMilliseconds(100));
311 100);
312 } 311 }
313 connection->Send("HTTP/1.1 200 OK\r\n", ""); 312 connection->Send("HTTP/1.1 200 OK\r\n", "");
314 } 313 }
315 314
316 void MockWebServer::SendResponseHelper( 315 void MockWebServer::SendResponseHelper(
317 test_server::ConfigurableConnection* connection, 316 test_server::ConfigurableConnection* connection,
318 const std::wstring& request_uri, 317 const std::wstring& request_uri,
319 const test_server::Request& request, 318 const test_server::Request& request,
320 CFInvocation invocation, 319 CFInvocation invocation,
321 bool add_no_cache_header) { 320 bool add_no_cache_header) {
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after
1018 server.web_server()->AddResponse(response); 1017 server.web_server()->AddResponse(response);
1019 1018
1020 std::wstring url(server.FormatHttpPath(L"form.html")); 1019 std::wstring url(server.FormatHttpPath(L"form.html"));
1021 1020
1022 ASSERT_TRUE(LaunchBrowser(IE, url.c_str())); 1021 ASSERT_TRUE(LaunchBrowser(IE, url.c_str()));
1023 loop_.RunFor(kChromeFrameLongNavigationTimeout); 1022 loop_.RunFor(kChromeFrameLongNavigationTimeout);
1024 1023
1025 EXPECT_EQ(1, response->get_request_count()); 1024 EXPECT_EQ(1, response->get_request_count());
1026 EXPECT_EQ(1, response->post_request_count()); 1025 EXPECT_EQ(1, response->post_request_count());
1027 } 1026 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698