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

Side by Side Diff: LayoutTests/http/tests/security/resources/drag-drop-allowed.html

Issue 1126253007: Block modal dialogs inside sandboxes. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: WebSandboxFlags. Created 5 years, 7 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 <html> 1 <html>
2 <body onload="runTest()"> 2 <body onload="runTest()">
3 <div contenteditable>drag<img src=abe.png id=dragme>me<span id=target>&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></div> 3 <div contenteditable>drag<img src=abe.png id=dragme>me<span id=target>&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></div>
4 <script> 4 <script>
5 function moveToCenter(element) { 5 function moveToCenter(element) {
6 var x, y; 6 var x, y;
7 x = element.offsetLeft + element.offsetWidth / 2; 7 x = element.offsetLeft + element.offsetWidth / 2;
8 y = element.offsetTop + element.offsetHeight / 2; 8 y = element.offsetTop + element.offsetHeight / 2;
9 eventSender.mouseMoveTo(x, y); 9 eventSender.mouseMoveTo(x, y);
10 } 10 }
11 11
12 function runTest() { 12 function runTest() {
13 e = document.getElementById("dragme"); 13 e = document.getElementById("dragme");
14 moveToCenter(e); 14 moveToCenter(e);
15 eventSender.mouseDown(); 15 eventSender.mouseDown();
16 16
17 e = document.getElementById("target"); 17 e = document.getElementById("target");
18 moveToCenter(e); 18 moveToCenter(e);
19 eventSender.mouseUp(); 19 eventSender.mouseUp();
20 20
21 if (document.getElementById("dragme").parentNode.tagName == "SPAN" && docume nt.getElementById("dragme").src.length > 10) 21 if (document.getElementById("dragme").parentNode.tagName == "SPAN" && docume nt.getElementById("dragme").src.length > 10)
22 alert("PASS"); 22 console.log("PASS");
23 else 23 else
24 alert("FAIL"); 24 console.log("FAIL");
25 25
26 testRunner.notifyDone(); 26 testRunner.notifyDone();
27 } 27 }
28 </script> 28 </script>
29 </body> 29 </body>
30 </html> 30 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698