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

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

Issue 9834022: Expand usage of platform-apps flag and permission features. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits (thanks, mihaip) Created 8 years, 9 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_browsertest.cc
diff --git a/chrome/browser/extensions/extension_browsertest.cc b/chrome/browser/extensions/extension_browsertest.cc
index c35ccb58585df5856bb431e15fdae527d7f5bb17..46d7accca6d3b61d8874ee585432edb56cd433de 100644
--- a/chrome/browser/extensions/extension_browsertest.cc
+++ b/chrome/browser/extensions/extension_browsertest.cc
@@ -36,6 +36,7 @@ ExtensionBrowserTest::ExtensionBrowserTest()
: loaded_(false),
installed_(false),
extension_installs_observed_(0),
+ extension_load_errors_observed_(0),
target_page_action_count_(-1),
target_visible_page_action_count_(-1) {
EXPECT_TRUE(temp_dir_.CreateUniqueTempDir());
@@ -425,6 +426,15 @@ void ExtensionBrowserTest::WaitForExtensionLoad() {
WaitForExtensionHostsToLoad();
}
+bool ExtensionBrowserTest::WaitForExtensionLoadError() {
+ int before = extension_load_errors_observed_;
+ ui_test_utils::RegisterAndWait(this,
+ chrome::NOTIFICATION_EXTENSION_LOAD_ERROR,
+ content::NotificationService::AllSources());
+ WaitForExtensionHostsToLoad();
+ return extension_load_errors_observed_ != before;
+}
+
bool ExtensionBrowserTest::WaitForExtensionCrash(
const std::string& extension_id) {
ExtensionService* service = browser()->profile()->GetExtensionService();
@@ -485,6 +495,12 @@ void ExtensionBrowserTest::Observe(
MessageLoopForUI::current()->Quit();
break;
+ case chrome::NOTIFICATION_EXTENSION_LOAD_ERROR:
+ VLOG(1) << "Got EXTENSION_LOAD_ERROR notification.";
+ ++extension_load_errors_observed_;
+ MessageLoopForUI::current()->Quit();
+ break;
+
case chrome::NOTIFICATION_EXTENSION_PAGE_ACTION_COUNT_CHANGED: {
LocationBarTesting* location_bar =
browser()->window()->GetLocationBar()->GetLocationBarForTesting();
« no previous file with comments | « chrome/browser/extensions/extension_browsertest.h ('k') | chrome/common/extensions/api/_permission_features.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698