Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / ManualTests / media-elements / video-moved-from-iframe-to-main-page.html
blobc344184e2361e5df83c57363bc0a807913888759
1 <html>
2 <head>
3 <script>
4 function getNextURL() {
5 var url = location.href;
6 var queryIndex = url.indexOf("?");
7 var loadCount = 1;
8 if (queryIndex >= 0) {
9 loadCount = parseInt(url.substring(queryIndex + 1));
10 if (loadCount >= 20)
11 return "";
13 url = url.substring(0, queryIndex);
15 return url + '?' + (loadCount + 1);
18 function start() {
19 var video = document.getElementById('iframe1').contentDocument.querySelector('video');
20 var documentElement = document.documentElement;
21 document.body.appendChild(video);
22 var iframe = document.querySelector('#iframe1');
23 iframe.parentNode.removeChild(iframe);
25 var url = getNextURL();
26 if (url.length == 0)
27 return;
29 location.href = url;
31 </script>
32 </head>
33 <body onload='start()'>
34 <p>Test for <a href="https://code.google.com/p/chromium/issues/detail?id=230117">Bug 230117</a><br>
35 This page should reload itself 20 times without crashing the tab. The test is complete when the page
36 stops reloading itself and the page URL ends with a ?20.
37 </p>
38 <iframe id="iframe1" src="video-iframe.html"></iframe>
39 </body>
40 </html>