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

Side by Side Diff: chrome/browser/plugin_test.cc

Issue 8873032: Removing MessageLoop::QuitTask() from chrome/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revert 3 more problematic files 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
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 // Tests for the top plugins to catch regressions in our plugin host code, as 5 // Tests for the top plugins to catch regressions in our plugin host code, as
6 // well as in the out of process code. Currently this tests: 6 // well as in the out of process code. Currently this tests:
7 // Flash 7 // Flash
8 // Real 8 // Real
9 // QuickTime 9 // QuickTime
10 // Windows Media Player 10 // Windows Media Player
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 initial_download_path_ = PluginTest::GetTestUrl("flash.html", "", false); 291 initial_download_path_ = PluginTest::GetTestUrl("flash.html", "", false);
292 download_helper_ = new PluginDownloadUrlHelper( 292 download_helper_ = new PluginDownloadUrlHelper(
293 initial_download_path_.spec(), NULL, 293 initial_download_path_.spec(), NULL,
294 static_cast<PluginDownloadUrlHelper::DownloadDelegate*>(this)); 294 static_cast<PluginDownloadUrlHelper::DownloadDelegate*>(this));
295 TestURLRequestContextGetter* context_getter = 295 TestURLRequestContextGetter* context_getter =
296 new TestURLRequestContextGetter; 296 new TestURLRequestContextGetter;
297 download_helper_->InitiateDownload(context_getter, 297 download_helper_->InitiateDownload(context_getter,
298 context_getter->GetIOMessageLoopProxy()); 298 context_getter->GetIOMessageLoopProxy());
299 299
300 MessageLoop::current()->PostDelayedTask( 300 MessageLoop::current()->PostDelayedTask(
301 FROM_HERE, new MessageLoop::QuitTask, 301 FROM_HERE, MessageLoop::QuitClosure(),
302 TestTimeouts::action_max_timeout_ms()); 302 TestTimeouts::action_max_timeout_ms());
303 } 303 }
304 304
305 virtual void OnDownloadCompleted(const FilePath& download_path, 305 virtual void OnDownloadCompleted(const FilePath& download_path,
306 bool success) { 306 bool success) {
307 success_ = success; 307 success_ = success;
308 final_download_path_ = download_path; 308 final_download_path_ = download_path;
309 MessageLoop::current()->Quit(); 309 MessageLoop::current()->Quit();
310 download_helper_ = NULL; 310 download_helper_ = NULL;
311 } 311 }
(...skipping 22 matching lines...) Expand all
334 TEST_F(PluginInstallerDownloadTest, PluginInstallerDownloadPathTest) { 334 TEST_F(PluginInstallerDownloadTest, PluginInstallerDownloadPathTest) {
335 MessageLoop loop(MessageLoop::TYPE_IO); 335 MessageLoop loop(MessageLoop::TYPE_IO);
336 Start(); 336 Start();
337 loop.Run(); 337 loop.Run();
338 338
339 EXPECT_TRUE(success()); 339 EXPECT_TRUE(success());
340 EXPECT_TRUE(initial_download_path().BaseName().value() == 340 EXPECT_TRUE(initial_download_path().BaseName().value() ==
341 final_download_path().BaseName().value()); 341 final_download_path().BaseName().value());
342 } 342 }
343 #endif // defined(OS_WIN) 343 #endif // defined(OS_WIN)
OLDNEW
« no previous file with comments | « chrome/browser/password_manager/password_store_x_unittest.cc ('k') | chrome/browser/prefs/pref_member_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698