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

Unified Diff: chrome/test/data/extensions/api_test/stubs/background.html

Issue 366024: Add stub functions for chrome.* APIs in content scripts. ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 | « chrome/renderer/user_script_slave.cc ('k') | chrome/test/data/extensions/api_test/stubs/content_script.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/api_test/stubs/background.html
===================================================================
--- chrome/test/data/extensions/api_test/stubs/background.html (revision 0)
+++ chrome/test/data/extensions/api_test/stubs/background.html (revision 0)
@@ -0,0 +1,16 @@
+<script>
+
+chrome.extension.onRequest.addListener(function(msg, sender, responseFunc) {
+ if (msg == "getApi") {
+ responseFunc(JSON.parse(chrome.test.getApiDefinitions()));
+ } else if (msg == "pass") {
+ chrome.test.notifyPass();
+ } else {
+ chrome.test.notifyFail("failed");
+ }
+});
+
+// On first install, send a success message so the test can continue.
+chrome.test.notifyPass();
+
+</script>
Property changes on: chrome\test\data\extensions\api_test\stubs\background.html
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « chrome/renderer/user_script_slave.cc ('k') | chrome/test/data/extensions/api_test/stubs/content_script.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698