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

Side by Side Diff: LayoutTests/http/tests/security/script-no-crossorigin-onerror-should-be-sanitized.html

Issue 19596004: Allow sites to enable 'window.onerror' handlers for cross-domain scripts. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase. 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 <body>
2 <script src="../../js-test-resources/js-test-pre.js"></script>
3 <script>
4 window.jsTestIsAsync = true;
5 description("The test passes if window.onerror gets sanitized information about the script error.");
6
7 window.onerror = function(msg, url, line) {
8 window.msg = msg;
9 window.url = url;
10 window.line = line;
11 shouldBeNull("msg.match(/SomeError/)");
12 shouldBeEqualToString("url", "");
13 shouldBe("line", "0");
14 finishJSTest();
15 }
16 </script>
17 <!-- crossorigin attribute is not set, we shouldn't get any specific info on the error. -->
18 <script src="http://localhost:8000/security/resources/cors-script.php?fail=true" ></script>
19 <script src="../../js-test-resources/js-test-post.js"></script>
20
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698