Index: chrome/test/data/extensions/api_test/webrequest_extensions/extension/framescript.js |
diff --git a/chrome/test/data/extensions/api_test/webrequest_extensions/extension/framescript.js b/chrome/test/data/extensions/api_test/webrequest_extensions/extension/framescript.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..f3761279cd130b425c4508c5b115887356969847 |
--- /dev/null |
+++ b/chrome/test/data/extensions/api_test/webrequest_extensions/extension/framescript.js |
@@ -0,0 +1,16 @@ |
+// Copyright 2015 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. |
+ |
+// |baseUrl| will be equivalent to 'http://example.com:PORT'; |
+var baseUrl = location.ancestorOrigins[0]; |
+ |
+var x = new XMLHttpRequest(); |
+x.open('GET', baseUrl + '/extensions/test_file.txt?framescript'); |
+x.onloadend = function() { |
+ // Sanity check. |
+ chrome.test.assertEq('Hello!', x.responseText); |
+ |
+ chrome.test.sendMessage('framescript_done'); |
+}; |
+x.send(); |