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

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

Issue 1431963002: Don't allow main world initialization while creating the initial empty document Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/test/data/extensions/api_test/bindings/chromei18nrepro/background.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_bindings_apitest.cc
diff --git a/chrome/browser/extensions/extension_bindings_apitest.cc b/chrome/browser/extensions/extension_bindings_apitest.cc
index 81e9b926daef425391532fc3d42752084dc67c58..dcb0fb7fef874fadadc629f82db6a85be86cb17c 100644
--- a/chrome/browser/extensions/extension_bindings_apitest.cc
+++ b/chrome/browser/extensions/extension_bindings_apitest.cc
@@ -157,5 +157,17 @@ IN_PROC_BROWSER_TEST_F(ExtensionBindingsApiTest, HandlerFunctionTypeChecking) {
EXPECT_EQ("success", result);
}
+// Regression test for crbug.com/340382, which was having extension bindings
+// flakily undefined because the script context was improperly classified.
+// Thanks to jhawkins@ for the only known reliable repro.
+IN_PROC_BROWSER_TEST_F(ExtensionBindingsApiTest,
+ RegressionTestForUndefinedBindings) {
+ // This is important - likely because the signin page does crazy stuff. This
+ // doesn't repro if we don't navigate to the signin page.
+ ui_test_utils::NavigateToURL(browser(), GURL("chrome://chrome-signin"));
+
+ ASSERT_TRUE(RunPlatformAppTest("bindings/chromei18nrepro")) << message_;
+}
+
} // namespace
} // namespace extensions
« no previous file with comments | « no previous file | chrome/test/data/extensions/api_test/bindings/chromei18nrepro/background.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698