OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src='../../../resources/js-test.js'></script> |
| 3 <script> |
| 4 description('Test that Custom Element should be defined while navigating between
frames.'); |
| 5 |
| 6 var customBody; |
| 7 var jsTestIsAsync = true; |
| 8 |
| 9 function linkInserter(doc) { |
| 10 return function() { |
| 11 customBody = doc.getElementById('thebody'); |
| 12 shouldBeDefined('customBody'); |
| 13 shouldBeEqualToString('customBody.toLocaleString()', '[object HTMLBodyEl
ement]'); |
| 14 finishJSTest(); |
| 15 } |
| 16 } |
| 17 |
| 18 function navigateIFrameThenInsertLink() { |
| 19 var iframe = document.getElementById('iframe'); |
| 20 iframe.onload = linkInserter(iframe.contentDocument); |
| 21 iframe.contentWindow.location = 'resources/empty-custom-body.html'; |
| 22 } |
| 23 </script> |
| 24 <iframe id='iframe' onload='navigateIFrameThenInsertLink()' src='resources/empty
-custom-body.html'> |
| 25 </iframe> |
OLD | NEW |