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

Side by Side Diff: LayoutTests/http/tests/security/svg-image-leak.html

Issue 40513003: Delete/move the remaining stale tests in TestExpectations. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: delete plugins/reentrant-update-widget-positions.html as well Created 7 years, 1 month 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 <script>
2 if (window.testRunner) {
3 testRunner.dumpAsText();
4 testRunner.waitUntilDone();
5 }
6
7 window.addEventListener("load", function() {
8 var cookie = document.cookie;
9
10 if (/font/.test(cookie) || /import/.test(cookie))
11 alert("FAIL! Cookies received: " + cookie);
12 else if (/img/.test(cookie))
13 alert("PASS");
14 else
15 alert("FAIL: Did not receive any cookies.")
16
17 document.cookie = "img=; Max-Age=-1; Path=/";
18 document.cookie = "font=; Max-Age=-1; Path=/";
19 document.cookie = "import=; Max-Age=-1; Path=/";
20
21 if (window.testRunner)
22 testRunner.notifyDone();
23 }, false);
24 </script>
25 First we load an image as a control to make sure we can set cookies:<br>
26 <img src="http://127.0.0.1:8000/security/resources/set-cookie.php?name=img&amp;v alue=PASS">
27
28 Then we load an SVGImage to see if we can issue network requests from inside the image:<br>
29 <img height=200px src='data:image/svg+xml;utf8,
30 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlin k">
31 <defs>
32
33 <style type="text/css">
34 @font-face { font-family: Extern2; src: url(http://127.0.0.1:8000/security/resou rces/set-cookie.php?name=font&amp;amp;value=FAIL) format("woff"); }
35
36 .cc {
37 font-family: Extern2;
38 font-size: 20px;
39 }
40 </style>
41
42 <style type="text/css">
43 @import url("http://127.0.0.1:8000/security/resources/set-cookie.php?name=import &amp;amp;value=FAIL");
44 </style>
45 </defs>
46
47 <polygon id="triangle" points="0,0 0,50 50,0" fill="#00FF00" stroke="#004400"/>
48 <text x="50" y="50" class="cc">groebert</text>
49
50 </svg>
51 '>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698