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

Side by Side Diff: LayoutTests/http/tests/security/xss-eval.html

Issue 19932002: Throw exceptions on all failed cross-origin access checks. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: test. Created 7 years, 5 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
1 <p>This page verifies that you can't use eval to subvert cross-domain checks.</p > 1 <p>This page verifies that you can't use eval to subvert cross-domain checks.</p >
2 <p>If the test passes, you'll see a pass message below.</p> 2 <p>If the test passes, you'll see a pass message below.</p>
3 <hr> 3 <hr>
4 <pre id="console"></pre> 4 <pre id="console"></pre>
5 5
6 <iframe style="width:0; height: 0" src="resources/xss-eval2.html"></iframe> 6 <iframe style="width:0; height: 0" src="resources/xss-eval2.html"></iframe>
7 7
8 <script> 8 <script>
9 if (window.testRunner) { 9 if (window.testRunner) {
10 testRunner.dumpAsText(); 10 testRunner.dumpAsText();
(...skipping 24 matching lines...) Expand all
35 } catch(e) { return e.name; } })(), "It's me!") 35 } catch(e) { return e.name; } })(), "It's me!")
36 36
37 shouldBe("childEval.call(frames[0], 'document').testExpando", 37 shouldBe("childEval.call(frames[0], 'document').testExpando",
38 (function() { try { 38 (function() { try {
39 return childEval.call(frames[0], 'document').testExpando; 39 return childEval.call(frames[0], 'document').testExpando;
40 } catch(e) { return e.name; } })(), "It's me too!"); 40 } catch(e) { return e.name; } })(), "It's me too!");
41 41
42 shouldBe("childEvalCaller('document').testExpando", 42 shouldBe("childEvalCaller('document').testExpando",
43 (function() { try { 43 (function() { try {
44 return childEvalCaller('document').testExpando; 44 return childEvalCaller('document').testExpando;
45 } catch(e) { return e.name; } })(), "TypeError"); 45 } catch(e) { return e.name; } })(), "SecurityError");
46 46
47 shouldBe("childLocalEvalCaller('document').testExpando", 47 shouldBe("childLocalEvalCaller('document').testExpando",
48 (function() { try { return childLocalEvalCaller('document').testExpando; } catch(e) { return e.name; } })(), "It's me too!"); 48 (function() { try { return childLocalEvalCaller('document').testExpando; } catch(e) { return e.name; } })(), "It's me too!");
49 49
50 if (window.testRunner) 50 if (window.testRunner)
51 testRunner.notifyDone(); 51 testRunner.notifyDone();
52 }, false); 52 }, false);
53 </script> 53 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698