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

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

Issue 8879033: Removing MessageLoop::QuitTask() from chrome_frame/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Really fixed Created 9 years 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
« no previous file with comments | « chrome_frame/test/test_server_test.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 EXPECT_CALL(*this, Post(_, testing::HasSubstr(post_suffix), _)) 292 EXPECT_CALL(*this, Post(_, testing::HasSubstr(post_suffix), _))
293 .WillRepeatedly(HandlePostedResponseHelper(this, invocation)); 293 .WillRepeatedly(HandlePostedResponseHelper(this, invocation));
294 } 294 }
295 295
296 void MockWebServer::HandlePostedResponse( 296 void MockWebServer::HandlePostedResponse(
297 test_server::ConfigurableConnection* connection, 297 test_server::ConfigurableConnection* connection,
298 const test_server::Request& request) { 298 const test_server::Request& request) {
299 posted_result_ = request.content(); 299 posted_result_ = request.content();
300 if (posted_result_ == expected_result_) { 300 if (posted_result_ == expected_result_) {
301 MessageLoop::current()->PostDelayedTask(FROM_HERE, 301 MessageLoop::current()->PostDelayedTask(FROM_HERE,
302 new MessageLoop::QuitTask, 302 MessageLoop::QuitClosure(),
303 100); 303 100);
304 } 304 }
305 connection->Send("HTTP/1.1 200 OK\r\n", ""); 305 connection->Send("HTTP/1.1 200 OK\r\n", "");
306 } 306 }
307 307
308 void MockWebServer::SendResponseHelper( 308 void MockWebServer::SendResponseHelper(
309 test_server::ConfigurableConnection* connection, 309 test_server::ConfigurableConnection* connection,
310 const std::wstring& request_uri, 310 const std::wstring& request_uri,
311 const test_server::Request& request, 311 const test_server::Request& request,
312 CFInvocation invocation, 312 CFInvocation invocation,
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after
1002 server.web_server()->AddResponse(response); 1002 server.web_server()->AddResponse(response);
1003 1003
1004 std::wstring url(server.FormatHttpPath(L"form.html")); 1004 std::wstring url(server.FormatHttpPath(L"form.html"));
1005 1005
1006 ASSERT_TRUE(LaunchBrowser(IE, url.c_str())); 1006 ASSERT_TRUE(LaunchBrowser(IE, url.c_str()));
1007 loop_.RunFor(kChromeFrameLongNavigationTimeoutInSeconds); 1007 loop_.RunFor(kChromeFrameLongNavigationTimeoutInSeconds);
1008 1008
1009 EXPECT_EQ(1, response->get_request_count()); 1009 EXPECT_EQ(1, response->get_request_count());
1010 EXPECT_EQ(1, response->post_request_count()); 1010 EXPECT_EQ(1, response->post_request_count());
1011 } 1011 }
OLDNEW
« no previous file with comments | « chrome_frame/test/test_server_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698