| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <html class="reftest-wait"> | 2 <html class="reftest-wait"> |
| 3 <title>WebVTT rendering, cue position after navigation</title> | 3 <title>WebVTT rendering, cue position after navigation</title> |
| 4 <link rel="match" href="navigate_cue_position-ref.html"> | 4 <link rel="match" href="navigate_cue_position-ref.html"> |
| 5 <script src="/common/reftest-wait.js"></script> | 5 <script src="/common/reftest-wait.js"></script> |
| 6 <script src="/common/utils.js"></script> | 6 <script src="/common/utils.js"></script> |
| 7 <style>iframe {width:100%; height:500px}</style> | 7 <style>iframe {width:100%; height:500px}</style> |
| 8 <script> | 8 <script> |
| 9 var uuid = token(); | 9 var uuid = token(); |
| 10 onload = function() { | 10 onload = function() { |
| 11 var frame = document.getElementsByTagName("iframe")[0].contentWindow; | 11 var frame = document.getElementsByTagName("iframe")[0].contentWindow; |
| 12 if (sessionStorage[uuid]) { | 12 if (sessionStorage[uuid]) { |
| 13 document.body.appendChild(document.createTextNode('FAIL (page reloaded a
fter navigation)')); | 13 document.body.appendChild(document.createTextNode('FAIL (page reloaded a
fter navigation)')); |
| 14 delete sessionStorage[uuid] | 14 delete sessionStorage[uuid] |
| 15 takeScreenshotDelayed(100); | 15 takeScreenshotDelayed(100); |
| 16 } else { | 16 } else { |
| 17 setTimeout(function() { | 17 setTimeout(function() { |
| 18 frame.location.assign('data:text/html,<body onload="setTimeout(funct
ion(){history.back()}, 100); sessionStorage[\'' + uuid + '\'] = \'true\';">x'); | 18 frame.location.assign('data:text/html,<body onload="setTimeout(funct
ion(){history.back()}, 100); sessionStorage[\'' + uuid + '\'] = \'true\';">x'); |
| 19 setTimeout(function() { | 19 setTimeout(function() { |
| 20 delete sessionStorage[uuid]; | 20 delete sessionStorage[uuid]; |
| 21 takeScreenshot(); | 21 takeScreenshot(); |
| 22 }, 500); | 22 }, 500); |
| 23 }, 100); | 23 }, 100); |
| 24 } | 24 } |
| 25 } | 25 } |
| 26 </script> | 26 </script> |
| 27 <iframe src="navigate_cue_position-1.html"></iframe> | 27 <iframe src="navigate_cue_position-1.html"></iframe> |
| OLD | NEW |