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

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

Issue 1433343003: [Extensions] Wait until the Window object is cleared before classifying contexts Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Latest master 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 d99e574ffb78f3034d52e1810b3ebb61151e82f4..3449ae35ab9f0f883a9ecb5c56a97ab7571aeaa3 100644
--- a/chrome/browser/extensions/extension_bindings_apitest.cc
+++ b/chrome/browser/extensions/extension_bindings_apitest.cc
@@ -183,5 +183,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