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..d99e574ffb78f3034d52e1810b3ebb61151e82f4 100644 |
--- a/chrome/browser/extensions/extension_bindings_apitest.cc |
+++ b/chrome/browser/extensions/extension_bindings_apitest.cc |
@@ -138,6 +138,32 @@ IN_PROC_BROWSER_TEST_F(ExtensionBindingsApiTest, NoExportOverriding) { |
EXPECT_EQ("success", result); |
} |
+IN_PROC_BROWSER_TEST_F(ExtensionBindingsApiTest, NoGinDefineOverriding) { |
+ ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
+ |
+ // We need to create runtime bindings in the web page. An extension that's |
+ // externally connectable will do that for us. |
+ ASSERT_TRUE(LoadExtension( |
+ test_data_dir_.AppendASCII("bindings") |
+ .AppendASCII("externally_connectable_everywhere"))); |
+ |
+ ui_test_utils::NavigateToURL( |
+ browser(), |
+ embedded_test_server()->GetURL( |
+ "/extensions/api_test/bindings/override_gin_define.html")); |
+ ASSERT_FALSE( |
+ browser()->tab_strip_model()->GetActiveWebContents()->IsCrashed()); |
+ |
+ // See chrome/test/data/extensions/api_test/bindings/override_gin_define.html. |
+ std::string result; |
+ EXPECT_TRUE(content::ExecuteScriptAndExtractString( |
+ browser()->tab_strip_model()->GetActiveWebContents(), |
+ "window.domAutomationController.send(" |
+ "document.getElementById('status').textContent.trim());", |
+ &result)); |
+ EXPECT_EQ("success", result); |
+} |
+ |
IN_PROC_BROWSER_TEST_F(ExtensionBindingsApiTest, HandlerFunctionTypeChecking) { |
ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
ui_test_utils::NavigateToURL( |