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

Side by Side Diff: chrome/browser/extensions/extension_crash_recovery_browsertest.cc

Issue 11413050: chrome/browser: Update calls from RunAllPending() to RunUntilIdle(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 "base/process_util.h" 5 #include "base/process_util.h"
6 #include "chrome/browser/browser_process.h" 6 #include "chrome/browser/browser_process.h"
7 #include "chrome/browser/extensions/extension_browsertest.h" 7 #include "chrome/browser/extensions/extension_browsertest.h"
8 #include "chrome/browser/extensions/extension_host.h" 8 #include "chrome/browser/extensions/extension_host.h"
9 #include "chrome/browser/extensions/extension_process_manager.h" 9 #include "chrome/browser/extensions/extension_process_manager.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 GetExtensionService()->terminated_extensions()->size(); 417 GetExtensionService()->terminated_extensions()->size();
418 LoadTestExtension(); 418 LoadTestExtension();
419 LoadSecondExtension(); 419 LoadSecondExtension();
420 CrashExtension(first_extension_id_); 420 CrashExtension(first_extension_id_);
421 ASSERT_EQ(size_before + 1, GetExtensionService()->extensions()->size()); 421 ASSERT_EQ(size_before + 1, GetExtensionService()->extensions()->size());
422 ASSERT_EQ(crash_size_before + 1, 422 ASSERT_EQ(crash_size_before + 1,
423 GetExtensionService()->terminated_extensions()->size()); 423 GetExtensionService()->terminated_extensions()->size());
424 424
425 ASSERT_EQ(1U, CountBalloons()); 425 ASSERT_EQ(1U, CountBalloons());
426 UninstallExtension(first_extension_id_); 426 UninstallExtension(first_extension_id_);
427 MessageLoop::current()->RunAllPending(); 427 MessageLoop::current()->RunUntilIdle();
428 428
429 SCOPED_TRACE("after uninstalling"); 429 SCOPED_TRACE("after uninstalling");
430 ASSERT_EQ(size_before + 1, GetExtensionService()->extensions()->size()); 430 ASSERT_EQ(size_before + 1, GetExtensionService()->extensions()->size());
431 ASSERT_EQ(crash_size_before, 431 ASSERT_EQ(crash_size_before,
432 GetExtensionService()->terminated_extensions()->size()); 432 GetExtensionService()->terminated_extensions()->size());
433 ASSERT_EQ(0U, CountBalloons()); 433 ASSERT_EQ(0U, CountBalloons());
434 } 434 }
435 435
436 // http://crbug.com/84719 436 // http://crbug.com/84719
437 #if defined(OS_LINUX) 437 #if defined(OS_LINUX)
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 &chrome::GetActiveWebContents(browser())->GetController())); 489 &chrome::GetActiveWebContents(browser())->GetController()));
490 chrome::Reload(browser(), CURRENT_TAB); 490 chrome::Reload(browser(), CURRENT_TAB);
491 observer.Wait(); 491 observer.Wait();
492 } 492 }
493 // Extension should now be loaded. 493 // Extension should now be loaded.
494 SCOPED_TRACE("after reloading the tab"); 494 SCOPED_TRACE("after reloading the tab");
495 CheckExtensionConsistency(first_extension_id_); 495 CheckExtensionConsistency(first_extension_id_);
496 ASSERT_EQ(size_before + 1, GetExtensionService()->extensions()->size()); 496 ASSERT_EQ(size_before + 1, GetExtensionService()->extensions()->size());
497 ASSERT_EQ(0U, CountBalloons()); 497 ASSERT_EQ(0U, CountBalloons());
498 } 498 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698