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

Side by Side Diff: chrome_frame/test/test_server_test.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/net/fake_external_tab.cc ('k') | chrome_frame/test/test_with_web_server.cc » ('j') | 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 <windows.h> 5 #include <windows.h>
6 #include <wininet.h> 6 #include <wininet.h>
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 struct QuitMessageHit { 117 struct QuitMessageHit {
118 explicit QuitMessageHit(MessageLoopForUI* loop) : loop_(loop), hit_(false) { 118 explicit QuitMessageHit(MessageLoopForUI* loop) : loop_(loop), hit_(false) {
119 } 119 }
120 120
121 MessageLoopForUI* loop_; 121 MessageLoopForUI* loop_;
122 bool hit_; 122 bool hit_;
123 }; 123 };
124 124
125 void QuitMessageLoop(QuitMessageHit* msg) { 125 void QuitMessageLoop(QuitMessageHit* msg) {
126 msg->hit_ = true; 126 msg->hit_ = true;
127 msg->loop_->PostTask(FROM_HERE, new MessageLoop::QuitTask); 127 msg->loop_->PostTask(FROM_HERE, MessageLoop::QuitClosure());
128 } 128 }
129 129
130 } // end namespace 130 } // end namespace
131 131
132 TEST_F(TestServerTest, TestServer) { 132 TEST_F(TestServerTest, TestServer) {
133 // The web server needs a loop to exist on this thread during construction 133 // The web server needs a loop to exist on this thread during construction
134 // the loop must be created before we construct the server. 134 // the loop must be created before we construct the server.
135 MessageLoopForUI loop; 135 MessageLoopForUI loop;
136 136
137 test_server::SimpleWebServer server(1337); 137 test_server::SimpleWebServer server(1337);
(...skipping 30 matching lines...) Expand all
168 EXPECT_EQ(file.accessed(), 1); 168 EXPECT_EQ(file.accessed(), 1);
169 EXPECT_EQ(redir.accessed(), 1); 169 EXPECT_EQ(redir.accessed(), 1);
170 170
171 EXPECT_TRUE(person_task.response().find("Guthrie") != std::string::npos); 171 EXPECT_TRUE(person_task.response().find("Guthrie") != std::string::npos);
172 EXPECT_TRUE(file_task.response().find("function") != std::string::npos); 172 EXPECT_TRUE(file_task.response().find("function") != std::string::npos);
173 EXPECT_TRUE(goog_task.response().find("<title>") != std::string::npos); 173 EXPECT_TRUE(goog_task.response().find("<title>") != std::string::npos);
174 } else { 174 } else {
175 ::TerminateThread(worker, ~0); 175 ::TerminateThread(worker, ~0);
176 } 176 }
177 } 177 }
OLDNEW
« no previous file with comments | « chrome_frame/test/net/fake_external_tab.cc ('k') | chrome_frame/test/test_with_web_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698