Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / compositing / overflow / do-not-crash-use-after-free-update-widget-positions.html
blob8f4d71cc76ae3093b28ae3f6a6171df7c1f37863
1 <!DOCTYPE html>
2 <!-- This test is to catch a flakey use-after-free for ASAN bots. (see crbug.com/402407) -->
3 <script>
4 function start() {
5 svgIframe = document.createElement('iframe');
6 svgIframe.src = 'resources/do-not-crash-use-after-free-update-widget-positions.svg';
8 bodyElement = document.body;
10 articleElement = document.createElement('article');
11 acronymElement = document.createElement('acronym');
13 bodyElement.style.overflow = 'scroll';
15 selectionRange = document.createRange();
16 selectionRange.selectNodeContents(articleElement);
17 selectionRange.surroundContents(bodyElement);
19 w3Iframe = document.createElementNS('http://www.w3.org/1999/xhtml', 'iframe');
20 w3Iframe.src = 'resources/do-not-crash-use-after-free-update-widget-positions-iframe.html';
21 w3Iframe.onload = iframeOnLoad;
22 document.documentElement.appendChild(w3Iframe);
24 selectionRange.insertNode(svgIframe);
25 bodyElement.style.position = 'fixed';
27 while (svgIframe.parentNode) {
28 svgIframe = svgIframe.parentNode;
31 svgIframe.createElement;
33 document.documentElement.appendChild(svgIframe);
35 acronymElement.style.position = 'absolute';
38 function iframeOnLoad() {
39 bodyElement.appendChild(acronymElement);
40 acronymElement.offsetWidth;
42 acronymElement.appendChild(w3Iframe);
43 w3Iframe.offsetWidth;
45 window.setTimeout('window.iframeCallback()', 50);
48 function iframeCallback() {
49 bodyElement.style.cssText = null;
51 w3Iframe.contentDocument.location.hash = 'element0';
54 if (window.testRunner) {
55 testRunner.dumpAsText();
57 </script>
58 <body onload = "start()">
59 This test passes if it doesn't crash.
60 </body>