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

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

Issue 1122483002: 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 victim.parentNode.removeChild(victim); 26 if (victim)
27 victim.parentNode.removeChild(victim);
27 document.body.offsetTop; 28 document.body.offsetTop;
28 29
29 if (window.testRunner) 30 if (window.testRunner)
30 testRunner.notifyDone(); 31 testRunner.notifyDone();
31 doingTest = false; 32 doingTest = false;
32 } 33 }
33 34
34 function doTest() 35 function doTest()
35 { 36 {
36 doingTest = true; 37 doingTest = true;
37 document.getElementById('plugin').style.top = "120px"; 38 document.getElementById('plugin').style.top = "120px";
38 document.body.offsetTop; 39 document.body.offsetTop;
39 doingTest = false; 40 doingTest = false;
40 } 41 }
41 42
42 window.addEventListener('load', doTest, false); 43 window.addEventListener('load', doTest, false);
43 </script> 44 </script>
44 </head> 45 </head>
45 <body> 46 <body>
46 47
47 <p>This test should not crash.</p> 48 <p>This test should not crash.</p>
48 <embed type="application/x-webkit-test-netscape" 49 <embed type="application/x-webkit-test-netscape"
49 onSetWindow="setWindowCalled()" 50 onSetWindow="setWindowCalled()"
50 id="plugin"> 51 id="plugin">
51 <embed name="victim" type="application/x-webkit-test-netscape" id="victim"> 52 <embed name="victim" type="application/x-webkit-test-netscape" id="victim">
52 53
53 </body> 54 </body>
54 </html> 55 </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