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

Unified Diff: chrome/browser/extensions/extension_crash_recovery_browsertest.cc

Issue 6249010: Cleanup: de-inline a bunch of classes, rename and move "PluginInstaller" to "... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_crash_recovery_browsertest.cc
===================================================================
--- chrome/browser/extensions/extension_crash_recovery_browsertest.cc (revision 72158)
+++ chrome/browser/extensions/extension_crash_recovery_browsertest.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -28,25 +28,21 @@
return browser()->profile()->GetExtensionProcessManager();
}
- CrashedExtensionInfoBarDelegate* GetCrashedExtensionInfoBarDelegate(
- int index) {
+ ConfirmInfoBarDelegate* GetInfoBarDelegate(int index) {
TabContents* current_tab = browser()->GetSelectedTabContents();
EXPECT_LT(index, current_tab->infobar_delegate_count());
- InfoBarDelegate* delegate = current_tab->GetInfoBarDelegateAt(index);
- return delegate->AsCrashedExtensionInfoBarDelegate();
+ return current_tab->GetInfoBarDelegateAt(index)->AsConfirmInfoBarDelegate();
}
- void AcceptCrashedExtensionInfobar(int index) {
- CrashedExtensionInfoBarDelegate* infobar =
- GetCrashedExtensionInfoBarDelegate(index);
+ void AcceptInfoBar(int index) {
+ ConfirmInfoBarDelegate* infobar = GetInfoBarDelegate(index);
ASSERT_TRUE(infobar);
infobar->Accept();
WaitForExtensionLoad();
}
- void CancelCrashedExtensionInfobar(int index) {
- CrashedExtensionInfoBarDelegate* infobar =
- GetCrashedExtensionInfoBarDelegate(index);
+ void CancelInfoBar(int index) {
+ ConfirmInfoBarDelegate* infobar = GetInfoBarDelegate(index);
ASSERT_TRUE(infobar);
infobar->Cancel();
}
@@ -118,7 +114,7 @@
ASSERT_EQ(size_before, GetExtensionService()->extensions()->size());
ASSERT_EQ(crash_size_before + 1,
GetExtensionService()->terminated_extensions()->size());
- AcceptCrashedExtensionInfobar(0);
+ AcceptInfoBar(0);
SCOPED_TRACE("after clicking the infobar");
CheckExtensionConsistency(size_before);
@@ -136,7 +132,7 @@
ASSERT_EQ(crash_size_before + 1,
GetExtensionService()->terminated_extensions()->size());
- CancelCrashedExtensionInfobar(0);
+ CancelInfoBar(0);
ReloadExtension(first_extension_id_);
SCOPED_TRACE("after reloading");
@@ -306,7 +302,7 @@
LoadSecondExtension();
CrashExtension(size_before);
ASSERT_EQ(size_before + 1, GetExtensionService()->extensions()->size());
- AcceptCrashedExtensionInfobar(0);
+ AcceptInfoBar(0);
SCOPED_TRACE("after clicking the infobar");
CheckExtensionConsistency(size_before);
@@ -319,7 +315,7 @@
LoadSecondExtension();
CrashExtension(size_before + 1);
ASSERT_EQ(size_before + 1, GetExtensionService()->extensions()->size());
- AcceptCrashedExtensionInfobar(0);
+ AcceptInfoBar(0);
SCOPED_TRACE("after clicking the infobar");
CheckExtensionConsistency(size_before);
@@ -344,13 +340,13 @@
{
SCOPED_TRACE("first infobar");
- AcceptCrashedExtensionInfobar(0);
+ AcceptInfoBar(0);
CheckExtensionConsistency(size_before);
}
{
SCOPED_TRACE("second infobar");
- AcceptCrashedExtensionInfobar(0);
+ AcceptInfoBar(0);
CheckExtensionConsistency(size_before);
CheckExtensionConsistency(size_before + 1);
}
@@ -367,13 +363,13 @@
{
SCOPED_TRACE("first infobar");
- AcceptCrashedExtensionInfobar(0);
+ AcceptInfoBar(0);
CheckExtensionConsistency(size_before);
}
{
SCOPED_TRACE("second infobar");
- AcceptCrashedExtensionInfobar(0);
+ AcceptInfoBar(0);
CheckExtensionConsistency(size_before);
CheckExtensionConsistency(size_before + 1);
}
@@ -403,8 +399,8 @@
CrashExtension(size_before);
ASSERT_EQ(size_before, GetExtensionService()->extensions()->size());
- CancelCrashedExtensionInfobar(0);
- AcceptCrashedExtensionInfobar(1);
+ CancelInfoBar(0);
+ AcceptInfoBar(1);
SCOPED_TRACE("infobars done");
ASSERT_EQ(size_before + 1, GetExtensionService()->extensions()->size());
@@ -435,7 +431,7 @@
{
SCOPED_TRACE("second: infobar");
- AcceptCrashedExtensionInfobar(0);
+ AcceptInfoBar(0);
CheckExtensionConsistency(size_before);
CheckExtensionConsistency(size_before + 1);
}

Powered by Google App Engine
This is Rietveld 408576698