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

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

Issue 1422383003: [Extensions] Make handler_function a hidden property (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test Created 5 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/test/data/extensions/api_test/bindings/handler_function_type_checking.html » ('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 328cadbce80dcfcf12bc6effbfb4dfba774b4eec..81e9b926daef425391532fc3d42752084dc67c58 100644
--- a/chrome/browser/extensions/extension_bindings_apitest.cc
+++ b/chrome/browser/extensions/extension_bindings_apitest.cc
@@ -138,5 +138,24 @@ IN_PROC_BROWSER_TEST_F(ExtensionBindingsApiTest, NoExportOverriding) {
EXPECT_EQ("success", result);
}
+IN_PROC_BROWSER_TEST_F(ExtensionBindingsApiTest, HandlerFunctionTypeChecking) {
+ ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
+ ui_test_utils::NavigateToURL(
+ browser(),
+ embedded_test_server()->GetURL(
+ "/extensions/api_test/bindings/handler_function_type_checking.html"));
+ content::WebContents* web_contents =
+ browser()->tab_strip_model()->GetActiveWebContents();
+ EXPECT_FALSE(web_contents->IsCrashed());
+ // See handler_function_type_checking.html.
+ std::string result;
+ EXPECT_TRUE(content::ExecuteScriptAndExtractString(
+ web_contents,
+ "window.domAutomationController.send("
+ "document.getElementById('status').textContent.trim());",
+ &result));
+ EXPECT_EQ("success", result);
+}
+
} // namespace
} // namespace extensions
« no previous file with comments | « no previous file | chrome/test/data/extensions/api_test/bindings/handler_function_type_checking.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698