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

Side by Side Diff: webkit/support/webkit_support.cc

Issue 11595003: webkit: Update the calls from RunAllPending() to RunUntilIdle(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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) 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 "webkit/support/webkit_support.h" 5 #include "webkit/support/webkit_support.h"
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/base64.h" 8 #include "base/base64.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 } 355 }
356 356
357 void SetUpTestEnvironmentForUnitTests( 357 void SetUpTestEnvironmentForUnitTests(
358 WebKit::Platform* shadow_platform_delegate) { 358 WebKit::Platform* shadow_platform_delegate) {
359 SetUpTestEnvironmentImpl(true, shadow_platform_delegate); 359 SetUpTestEnvironmentImpl(true, shadow_platform_delegate);
360 } 360 }
361 361
362 void TearDownTestEnvironment() { 362 void TearDownTestEnvironment() {
363 // Flush any remaining messages before we kill ourselves. 363 // Flush any remaining messages before we kill ourselves.
364 // http://code.google.com/p/chromium/issues/detail?id=9500 364 // http://code.google.com/p/chromium/issues/detail?id=9500
365 MessageLoop::current()->RunAllPending(); 365 MessageLoop::current()->RunUntilIdle();
366 366
367 BeforeShutdown(); 367 BeforeShutdown();
368 if (RunningOnValgrind()) 368 if (RunningOnValgrind())
369 WebKit::WebCache::clear(); 369 WebKit::WebCache::clear();
370 WebKit::shutdown(); 370 WebKit::shutdown();
371 delete test_environment; 371 delete test_environment;
372 test_environment = NULL; 372 test_environment = NULL;
373 AfterShutdown(); 373 AfterShutdown();
374 logging::CloseLogFile(); 374 logging::CloseLogFile();
375 } 375 }
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 555
556 void QuitMessageLoop() { 556 void QuitMessageLoop() {
557 MessageLoop::current()->Quit(); 557 MessageLoop::current()->Quit();
558 } 558 }
559 559
560 void QuitMessageLoopNow() { 560 void QuitMessageLoopNow() {
561 MessageLoop::current()->QuitNow(); 561 MessageLoop::current()->QuitNow();
562 } 562 }
563 563
564 void RunAllPendingMessages() { 564 void RunAllPendingMessages() {
565 MessageLoop::current()->RunAllPending(); 565 MessageLoop::current()->RunUntilIdle();
566 } 566 }
567 567
568 bool MessageLoopNestableTasksAllowed() { 568 bool MessageLoopNestableTasksAllowed() {
569 return MessageLoop::current()->NestableTasksAllowed(); 569 return MessageLoop::current()->NestableTasksAllowed();
570 } 570 }
571 571
572 void MessageLoopSetNestableTasksAllowed(bool allowed) { 572 void MessageLoopSetNestableTasksAllowed(bool allowed) {
573 MessageLoop::current()->SetNestableTasksAllowed(allowed); 573 MessageLoop::current()->SetNestableTasksAllowed(allowed);
574 } 574 }
575 575
576 void DispatchMessageLoop() { 576 void DispatchMessageLoop() {
577 MessageLoop* current = MessageLoop::current(); 577 MessageLoop* current = MessageLoop::current();
578 MessageLoop::ScopedNestableTaskAllower allow(current); 578 MessageLoop::ScopedNestableTaskAllower allow(current);
579 current->RunAllPending(); 579 current->RunUntilIdle();
580 } 580 }
581 581
582 WebDevToolsAgentClient::WebKitClientMessageLoop* CreateDevToolsMessageLoop() { 582 WebDevToolsAgentClient::WebKitClientMessageLoop* CreateDevToolsMessageLoop() {
583 return new WebKitClientMessageLoopImpl(); 583 return new WebKitClientMessageLoopImpl();
584 } 584 }
585 585
586 void PostDelayedTask(void (*func)(void*), void* context, int64 delay_ms) { 586 void PostDelayedTask(void (*func)(void*), void* context, int64 delay_ms) {
587 MessageLoop::current()->PostDelayedTask( 587 MessageLoop::current()->PostDelayedTask(
588 FROM_HERE, 588 FROM_HERE,
589 base::Bind(func, context), 589 base::Bind(func, context),
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 // Logging 872 // Logging
873 void EnableWebCoreLogChannels(const std::string& channels) { 873 void EnableWebCoreLogChannels(const std::string& channels) {
874 webkit_glue::EnableWebCoreLogChannels(channels); 874 webkit_glue::EnableWebCoreLogChannels(channels);
875 } 875 }
876 876
877 void SetGamepadData(const WebKit::WebGamepads& pads) { 877 void SetGamepadData(const WebKit::WebGamepads& pads) {
878 test_environment->webkit_platform_support()->setGamepadData(pads); 878 test_environment->webkit_platform_support()->setGamepadData(pads);
879 } 879 }
880 880
881 } // namespace webkit_support 881 } // namespace webkit_support
OLDNEW
« no previous file with comments | « webkit/quota/quota_temporary_storage_evictor_unittest.cc ('k') | webkit/tools/test_shell/test_shell_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698