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

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

Issue 655143003: Don't try to create extensionoptions for extensions that don't exist. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/resources/extensions/extension_list.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_webui_apitest.cc
diff --git a/chrome/browser/extensions/extension_webui_apitest.cc b/chrome/browser/extensions/extension_webui_apitest.cc
index 16f91583372b30790fd453f43e3649796d9d670e..4e709500fed653a2f924f77f16eb16d79584a7d5 100644
--- a/chrome/browser/extensions/extension_webui_apitest.cc
+++ b/chrome/browser/extensions/extension_webui_apitest.cc
@@ -219,7 +219,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionWebUITest, CanEmbedExtensionOptions) {
ASSERT_TRUE(listener->WaitUntilSatisfied());
listener->Reply(extension->id());
- listener.reset(new ExtensionTestMessageListener("guest loaded", false));
+ listener.reset(new ExtensionTestMessageListener("load", false));
ASSERT_TRUE(listener->WaitUntilSatisfied());
}
@@ -241,6 +241,32 @@ IN_PROC_BROWSER_TEST_F(ExtensionWebUITest, ReceivesExtensionOptionsOnClose) {
ASSERT_TRUE(listener->WaitUntilSatisfied());
}
+// Regression test for crbug.com/414526.
+//
+// Same setup as CanEmbedExtensionOptions but disable the extension before
+// embedding.
+IN_PROC_BROWSER_TEST_F(ExtensionWebUITest, EmbedDisabledExtension) {
+ scoped_ptr<ExtensionTestMessageListener> listener(
+ new ExtensionTestMessageListener("ready", true));
+
+ std::string extension_id;
+ {
+ const Extension* extension =
+ LoadExtension(test_data_dir_.AppendASCII("extension_options")
+ .AppendASCII("embed_self"));
+ ASSERT_TRUE(extension);
+ extension_id = extension->id();
+ DisableExtension(extension_id);
+ }
+
+ ASSERT_TRUE(RunTestOnExtensionsFrame("can_embed_extension_options.js"));
+
+ ASSERT_TRUE(listener->WaitUntilSatisfied());
+ listener->Reply(extension_id);
+ listener.reset(new ExtensionTestMessageListener("createfailed", false));
+ ASSERT_TRUE(listener->WaitUntilSatisfied());
+}
+
} // namespace
} // namespace extensions
« no previous file with comments | « no previous file | chrome/browser/resources/extensions/extension_list.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698