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

Unified Diff: chrome/test/data/extensions/webui/send_message.js

Issue 404883002: Allow extension APIs to be called from WebUI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: android compile Created 6 years, 5 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
Index: chrome/test/data/extensions/webui/send_message.js
diff --git a/chrome/test/data/extensions/webui/send_message.js b/chrome/test/data/extensions/webui/send_message.js
new file mode 100644
index 0000000000000000000000000000000000000000..69ab31429a92caa30db5c0c63c6526f111b528ef
--- /dev/null
+++ b/chrome/test/data/extensions/webui/send_message.js
@@ -0,0 +1,16 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// out/Debug/browser_tests --gtest_filter=ExtensionWebUITest.SendMessage
+
+chrome.test.sendMessage('ping', function(reply) {
+ if (reply != 'pong') {
+ console.error('Expected "pong", Actual ' + JSON.stringify(reply));
+ chrome.test.sendMessage('false');
+ } else {
+ chrome.test.sendMessage('true');
+ }
+});
+
+domAutomationController.send(true);
« no previous file with comments | « chrome/test/data/extensions/webui/sanity_check_available_apis.js ('k') | content/browser/child_process_security_policy_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698