| Index: third_party/WebKit/LayoutTests/http/tests/images/force-reload.html
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/images/force-reload.html b/third_party/WebKit/LayoutTests/http/tests/images/force-reload.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..7da87314c8bc83dad5885f6ea210a292cc953580
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/images/force-reload.html
|
| @@ -0,0 +1,26 @@
|
| +<!DOCTYPE html>
|
| +<script src="../resources/testharness.js"></script>
|
| +<script src="../resources/testharnessreport.js"></script>
|
| +<script>
|
| +var t = async_test("ForceReload should get a new image for an <img> element");
|
| +function triggerReload() {
|
| + var img = document.getElementById('img');
|
| + var originalWidth = img.width;
|
| + var originalHeight = img.height;
|
| +
|
| + img.onload = t.step_func_done(function() {
|
| + assert_not_equals(originalWidth, img.width, "Should be reloaded: width");
|
| + assert_not_equals(originalHeight, img.height, "Should be reloaded: height");
|
| + });
|
| +
|
| + if (window.internals) {
|
| + internals.forceImageReload(img);
|
| + }
|
| +}
|
| +</script>
|
| +
|
| +<!-- We call triggerReload() strictly after document load event,
|
| +because reloading is not enforced until document load event is finished. -->
|
| +<body onload="setTimeout(t.step_func(triggerReload), 0)">
|
| +<img id="img" src="../cache/resources/random-cached-image.cgi">
|
| +</body>
|
|
|