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

Side by Side Diff: LayoutTests/plugins/update-widgets-crash.html

Issue 1120963002: Revert of plugins/update-widgets-crash.html victim element goes missing (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 2
3 <html> 3 <html>
4 <head> 4 <head>
5 <style type="text/css" media="screen"> 5 <style type="text/css" media="screen">
6 embed { 6 embed {
7 position: relative; 7 position: relative;
8 width: 100px; 8 width: 100px;
9 height: 100px; 9 height: 100px;
10 } 10 }
11 </style> 11 </style>
12 <script type="text/javascript" charset="utf-8"> 12 <script type="text/javascript" charset="utf-8">
13 if (window.testRunner) { 13 if (window.testRunner) {
14 testRunner.dumpAsText(); 14 testRunner.dumpAsText();
15 testRunner.waitUntilDone(); 15 testRunner.waitUntilDone();
16 } 16 }
17 17
18 // This gets called automatically from the test plugin. 18 // This gets called automatically from the test plugin.
19 var doingTest = false; 19 var doingTest = false;
20 function setWindowCalled() 20 function setWindowCalled()
21 { 21 {
22 if (!doingTest) 22 if (!doingTest)
23 return; 23 return;
24 24
25 var victim = document.getElementById('victim'); 25 var victim = document.getElementById('victim');
26 if (victim) 26 victim.parentNode.removeChild(victim);
27 victim.parentNode.removeChild(victim);
28 document.body.offsetTop; 27 document.body.offsetTop;
29 28
30 if (window.testRunner) 29 if (window.testRunner)
31 testRunner.notifyDone(); 30 testRunner.notifyDone();
32 doingTest = false; 31 doingTest = false;
33 } 32 }
34 33
35 function doTest() 34 function doTest()
36 { 35 {
37 doingTest = true; 36 doingTest = true;
38 document.getElementById('plugin').style.top = "120px"; 37 document.getElementById('plugin').style.top = "120px";
39 document.body.offsetTop; 38 document.body.offsetTop;
40 doingTest = false; 39 doingTest = false;
41 } 40 }
42 41
43 window.addEventListener('load', doTest, false); 42 window.addEventListener('load', doTest, false);
44 </script> 43 </script>
45 </head> 44 </head>
46 <body> 45 <body>
47 46
48 <p>This test should not crash.</p> 47 <p>This test should not crash.</p>
49 <embed type="application/x-webkit-test-netscape" 48 <embed type="application/x-webkit-test-netscape"
50 onSetWindow="setWindowCalled()" 49 onSetWindow="setWindowCalled()"
51 id="plugin"> 50 id="plugin">
52 <embed name="victim" type="application/x-webkit-test-netscape" id="victim"> 51 <embed name="victim" type="application/x-webkit-test-netscape" id="victim">
53 52
54 </body> 53 </body>
55 </html> 54 </html>
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698