blob: 60e13a0795d7dc320f2d6bee66b61c6e749a1141 [file] [log] [blame]
<!DOCTYPE html>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<img id="img" src="../../../images/resources/test-load.jpg">
<script>
setup({ explicit_done: true });
var img = document.getElementById("img");
img.onload = function (e) {
var path = e.path;
test(function () {
assert_equals(path.length, 4, 'path.length');
assert_equals(path[0], img, 'path[0] should be img');
assert_equals(path[1], document.body, 'path[1] should be body');
assert_equals(path[2], document.documentElement, 'path[2] should be html');
assert_equals(path[3], document, 'path[3] should be document');
}, "event.path for img.onload");
done();
};
</script>