Skip to content

Commit

Permalink
adding tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nupurbaghel committed Jul 23, 2018
1 parent 20626a8 commit a686565
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/wpt/metadata/MANIFEST.json
Original file line number Diff line number Diff line change
Expand Up @@ -346299,6 +346299,12 @@
{}
]
],
"html/semantics/embedded-content/the-img-element/null-image-source.html": [
[
"/html/semantics/embedded-content/the-img-element/null-image-source.html",
{}
]
],
"html/semantics/embedded-content/the-img-element/relevant-mutations.html": [
[
"/html/semantics/embedded-content/the-img-element/relevant-mutations.html",
Expand Down Expand Up @@ -585444,6 +585450,10 @@
"3752b0f4f5b31ca0bf55b99a400dd8cd7a12b8a7",
"testharness"
],
"html/semantics/embedded-content/the-img-element/null-image-source.html": [
"51f18333486ef4d560c57437255a1b0ada784a59",
"testharness"
],
"html/semantics/embedded-content/the-img-element/relevant-mutations.html": [
"3b4171a783f97facca39bcc342df253597876412",
"testharness"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!doctype html>
<meta charset="utf-8">
<title>Loading a null image source with empty src, empty srcset or having parent picture should fire an error</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id=log></div>
<img src="">
<img srcset="">
<parent><img></parent>
<script>
function check(img) {
async_test(function(t) {
img.onerror = t.step_func(function(e) {
assert_equals(e.type, "error", "null image source check failed");
t.done();
});
});
}
onload = function() {
[].forEach.call(document.querySelectorAll('img'), check);
done();
};
</script>

0 comments on commit a686565

Please sign in to comment.