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

Side by Side 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, 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Contains holistic tests of the bindings infrastructure 5 // Contains holistic tests of the bindings infrastructure
6 6
7 #include "chrome/browser/extensions/api/permissions/permissions_api.h" 7 #include "chrome/browser/extensions/api/permissions/permissions_api.h"
8 #include "chrome/browser/extensions/extension_apitest.h" 8 #include "chrome/browser/extensions/extension_apitest.h"
9 #include "chrome/browser/net/url_request_mock_util.h" 9 #include "chrome/browser/net/url_request_mock_util.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 // See chrome/test/data/extensions/api_test/bindings/override_exports.html. 131 // See chrome/test/data/extensions/api_test/bindings/override_exports.html.
132 std::string result; 132 std::string result;
133 EXPECT_TRUE(content::ExecuteScriptAndExtractString( 133 EXPECT_TRUE(content::ExecuteScriptAndExtractString(
134 browser()->tab_strip_model()->GetActiveWebContents(), 134 browser()->tab_strip_model()->GetActiveWebContents(),
135 "window.domAutomationController.send(" 135 "window.domAutomationController.send("
136 "document.getElementById('status').textContent.trim());", 136 "document.getElementById('status').textContent.trim());",
137 &result)); 137 &result));
138 EXPECT_EQ("success", result); 138 EXPECT_EQ("success", result);
139 } 139 }
140 140
141 IN_PROC_BROWSER_TEST_F(ExtensionBindingsApiTest, HandlerFunctionTypeChecking) {
142 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
143 ui_test_utils::NavigateToURL(
144 browser(),
145 embedded_test_server()->GetURL(
146 "/extensions/api_test/bindings/handler_function_type_checking.html"));
147 content::WebContents* web_contents =
148 browser()->tab_strip_model()->GetActiveWebContents();
149 EXPECT_FALSE(web_contents->IsCrashed());
150 // See handler_function_type_checking.html.
151 std::string result;
152 EXPECT_TRUE(content::ExecuteScriptAndExtractString(
153 web_contents,
154 "window.domAutomationController.send("
155 "document.getElementById('status').textContent.trim());",
156 &result));
157 EXPECT_EQ("success", result);
158 }
159
141 } // namespace 160 } // namespace
142 } // namespace extensions 161 } // namespace extensions
OLDNEW
« 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