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

Unified Diff: chrome/test/data/extensions/api_test/cross_origin_xhr/all_urls/content_script.js

Issue 8138004: Fix issues related to <all_urls> in extensions. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: make the plugin.dll empty so it loads everywhere Created 9 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
Index: chrome/test/data/extensions/api_test/cross_origin_xhr/all_urls/content_script.js
diff --git a/chrome/test/data/extensions/api_test/cross_origin_xhr/all_urls/content_script.js b/chrome/test/data/extensions/api_test/cross_origin_xhr/all_urls/content_script.js
new file mode 100644
index 0000000000000000000000000000000000000000..48c6e5c36eca88b7e168cd3b487d9ce77cf2f55b
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/cross_origin_xhr/all_urls/content_script.js
@@ -0,0 +1,29 @@
+// Copyright (c) 2011 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.
+
+chrome.extension.onRequest.addListener(
+ function(url, sender, sendResponse) {
+ var req = new XMLHttpRequest();
+ req.open('GET', url, true);
+
+ req.onload = function() {
+ sendResponse({
+ 'event': 'load',
+ 'status': req.status,
+ 'text': req.responseText
+ });
+ };
+ req.onerror = function() {
+ sendResponse({
+ 'event': 'error',
+ 'status': req.status,
+ 'text': req.responseText
+ });
+ };
+
+ req.send(null);
+ });
+
+chrome.extension.sendRequest('injected');
+

Powered by Google App Engine
This is Rietveld 408576698