OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <meta charset=utf-8> |
| 3 <title>Href - script element tests on markup</title> |
| 4 <script src='/resources/testharness.js'></script> |
| 5 <script src='/resources/testharnessreport.js'></script> |
| 6 <script src='testcommon.js'></script> |
| 7 <body> |
| 8 <div id='log'></div> |
| 9 <svg id='svg' width='100' height='100' viewBox='0 0 100 100'> |
| 10 <script id='script' href='testScripts/externalScript1.js' |
| 11 xlink:href='testScripts/externalScript2.js'></script> |
| 12 </svg> |
| 13 <script> |
| 14 'use strict'; |
| 15 |
| 16 // Use an independent test file for markup testing because it may affect other |
| 17 // tests. |
| 18 |
| 19 test(function(t) { |
| 20 var script = document.getElementById('script'); |
| 21 assert_equals(script.href.baseVal, 'testScripts/externalScript1.js'); |
| 22 assert_equals(loadedScript(), 'externalScript1'); |
| 23 }, 'Test for loading external script by markup when setting both href and ' + |
| 24 'xlink:href'); |
| 25 |
| 26 </script> |
| 27 </body> |
OLD | NEW |