| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>base element test </title> | |
| <script src="../resources/testharness.js"></script> | |
| <script src="../resources/testharnessreport.js"></script> | |
| </head> | |
| <body> | |
| Test for bugs.chromium.org #569760: <br/> | |
| <img id="img1" ><br/> | |
| <script> | |
| var test = async_test('image loading should be loaded successfully regardless of base element'); | |
| test.step(function () { | |
| var elm = document.getElementById('img1'); | |
| elm.src = 'resources/image1.png'; | |
| elm.onerror = test.step_func(function () { | |
| assert_unreached("onerror() of image."); | |
| test.done(); | |
| }); | |
| elm.onload = test.step_func(function () { | |
| assert_true(true, "Loaded successfully."); | |
| test.done(); | |
| }); | |
| var base = document.createElement("base"); | |
| base.setAttribute("href", "resources/"); | |
| document.head.appendChild(base); | |
| }); | |
| </script> | |
| </body> | |
| </html> |