mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-02-04 06:23:45 +00:00
update test
This commit is contained in:
@@ -103,6 +103,7 @@
|
|||||||
const img = document.createElement("img");
|
const img = document.createElement("img");
|
||||||
let count = 0;
|
let count = 0;
|
||||||
img.addEventListener("load", ({ bubbles, cancelBubble, cancelable, composed, isTrusted, target }) => {
|
img.addEventListener("load", ({ bubbles, cancelBubble, cancelable, composed, isTrusted, target }) => {
|
||||||
|
testing.expectEqual(true, count < 3);
|
||||||
count++;
|
count++;
|
||||||
|
|
||||||
testing.expectEqual(false, bubbles);
|
testing.expectEqual(false, bubbles);
|
||||||
@@ -118,7 +119,7 @@
|
|||||||
testing.expectEqual("https://cdn.lightpanda.io/website/assets/images/docs/hn.png", img.src);
|
testing.expectEqual("https://cdn.lightpanda.io/website/assets/images/docs/hn.png", img.src);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Should work since we synchronously exeute the listener.
|
// Make sure count is incremented asynchronously.
|
||||||
testing.expectEqual(3, count);
|
testing.expectEqual(0, count);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user