|  | <html> | 
|  | <head> | 
|  | <script> | 
|  | if (window.testRunner) { | 
|  | testRunner.dumpAsText(); | 
|  | testRunner.setCanOpenWindows(); | 
|  | testRunner.waitUntilDone(); | 
|  | } | 
|  |  | 
|  | var xmlWindow; | 
|  |  | 
|  | function print(str) | 
|  | { | 
|  | document.getElementById('output').textContent = str; | 
|  | xmlWindow.close(); | 
|  | testRunner.notifyDone(); | 
|  | } | 
|  |  | 
|  | function checkSourceXML() | 
|  | { | 
|  | var sourceXML = xmlWindow.document.getElementById('webkit-xml-viewer-source-xml'); | 
|  | if (sourceXML && sourceXML.firstChild.nodeName == 'root') | 
|  | print('SUCCESS'); | 
|  | else | 
|  | print('FAIL'); | 
|  | } | 
|  |  | 
|  | function onload() | 
|  | { | 
|  | xmlWindow = window.open('resources/sample.xml', "XMLViewerTestWindow"); | 
|  | xmlWindow.onload = checkSourceXML; | 
|  | } | 
|  |  | 
|  | </script> | 
|  | </head> | 
|  | <body onload="onload();"> | 
|  | <p>Tests extensions hooks in xml viewer.</p> | 
|  | <div id='output'></div> | 
|  | </body> | 
|  | </html> |