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

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

Issue 10807047: Create content\public\test\test_utils.h to hold common test classes that are used by unit and brows… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 months 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 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 const int tabs_before = tab_strip->count(); 476 const int tabs_before = tab_strip->count();
477 CrashExtension(first_extension_id_); 477 CrashExtension(first_extension_id_);
478 478
479 // Tab should still be open, and extension should be crashed. 479 // Tab should still be open, and extension should be crashed.
480 EXPECT_EQ(tabs_before, tab_strip->count()); 480 EXPECT_EQ(tabs_before, tab_strip->count());
481 EXPECT_EQ(size_before, GetExtensionService()->extensions()->size()); 481 EXPECT_EQ(size_before, GetExtensionService()->extensions()->size());
482 EXPECT_EQ(crash_size_before + 1, 482 EXPECT_EQ(crash_size_before + 1,
483 GetExtensionService()->terminated_extensions()->size()); 483 GetExtensionService()->terminated_extensions()->size());
484 484
485 { 485 {
486 ui_test_utils::WindowedNotificationObserver observer( 486 content::WindowedNotificationObserver observer(
487 content::NOTIFICATION_LOAD_STOP, 487 content::NOTIFICATION_LOAD_STOP,
488 content::Source<NavigationController>( 488 content::Source<NavigationController>(
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
« no previous file with comments | « chrome/browser/extensions/extension_browsertest.cc ('k') | chrome/browser/extensions/extension_management_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698