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

Side by Side Diff: LayoutTests/http/tests/htmlimports/resources/cors-having-crossorigin-scripts.cgi

Issue 19762002: [HTML Imports] Let script of imported document running. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Made a test more robust. Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 #!/usr/bin/perl -wT
2 use strict;
3
4 print "Content-Type: text/html\n";
5 print "Access-Control-Allow-Credentials: true\n";
6 print "Access-Control-Allow-Origin: http://127.0.0.1:8000\n\n";
7
8 print <<EOF
9 <html><body>
10 <script>
11 thisDocument = document.currentScript.ownerDocument;
12 function loadScriptFrom(url) {
13 var element = thisDocument.createElement("script");
14 element.setAttribute("crossorigin", "");
15 element.setAttribute("src", url);
16 thisDocument.head.appendChild(element);
17 return element;
18 }
19
20 loadScriptFrom('http://127.0.0.1:8000/htmlimports/resources/external-script.js') ;
21 loadScriptFrom('http://127.0.0.1:8000/htmlimports/resources/cors-js.cgi');
22 loadScriptFrom('http://127.0.0.1:8000/htmlimports/resources/cors-js-for-localhos t.cgi');
23 window.setTimeout(function() { loadScriptFrom('run-check.js'); }, 100);
24 </script>
25 </body></html>
26 EOF
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698