Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Verify that aborted image requests do not cause extraneous load events.
- Loading branch information
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<html> | ||
<head> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script> | ||
async_test(function(t) { | ||
var i = new Image(); | ||
i.src = "2x2.png"; | ||
i.src = "2x2.png"; | ||
i.onload = t.step_func(function() { | ||
i.onload = this.unreached_func("Load event for aborted request."); | ||
t.step_timeout(t.step_func_done(), 100); | ||
}); | ||
}, "Multiple requests for the same URL do not trigger multiple load events."); | ||
|
||
async_test(function(t) { | ||
var i = new Image(); | ||
i.src = "test.png"; | ||
i.src = "2x2.png"; | ||
i.onload = t.step_func(function() { | ||
i.onload = this.unreached_func("Load event for aborted request."); | ||
t.step_timeout(t.step_func_done(), 100); | ||
}); | ||
}, "Multiple requests for different URL do not trigger multiple load events."); | ||
</script> |