Commit 2e15b21f authored by yoav@yoav.ws's avatar yoav@yoav.ws

Fixed image-sizes-js-change flakiness

Switched from using dumpResourceRequestCallbacks to using direct
memoryCache APIs in internals.

BUG=426041

Review URL: https://codereview.chromium.org/675853003

git-svn-id: svn://svn.chromium.org/blink/trunk@184348 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent c1a02303
......@@ -1477,8 +1477,6 @@ crbug.com/426543 fast/js/mozilla/strict/15.4.4.13.html [ Pass Failure ]
crbug.com/425537 fast/notifications/notifications-constructor-request-permission.html [ Skip ]
crbug.com/426041 fast/dom/HTMLImageElement/image-sizes-js-change.html [ Pass Failure ]
crbug.com/401377 [ Win Release ] http/tests/serviceworker/fetch-mixed-content.html [ Pass Timeout ]
crbug.com/426078 [ Win7 ] http/tests/security/img-crossorigin-no-credentials-prompt.html [ Pass Timeout ]
main frame - img requested 'image-set-4x.png'
PASS successfullyParsed is true
TEST COMPLETE
PASS currentSrcFileName("foo") is "image-set-4x.png"
PASS internals.isLoadingFromMemoryCache("resources/image-set-4x.png") is true
PASS internals.isLoadingFromMemoryCache("../../hidpi/resources/image-set-2x.png") is false
PASS internals.isLoadingFromMemoryCache("../../hidpi/resources/image-set-1x.png") is false
PASS internals.isLoadingFromMemoryCache("resources/blue-100-px-square.png") is false
......@@ -5,6 +5,9 @@
<script>
if (window.testRunner)
testRunner.dumpAsText();
if (internals)
internals.evictAllResources();
function updateSrc() {
var img = document.getElementById("foo");
......@@ -16,12 +19,16 @@
}
addEventListener("DOMContentLoaded", function() {
if (window.testRunner && sessionStorage.pageReloaded)
testRunner.dumpResourceRequestCallbacks();
updateSrc();
}, false);
addEventListener("load", function() {
shouldBe('currentSrcFileName("foo")', '"image-set-4x.png"');
if (internals) {
shouldBeTrue('internals.isLoadingFromMemoryCache("resources/image-set-4x.png")');
shouldBeFalse('internals.isLoadingFromMemoryCache("../../hidpi/resources/image-set-2x.png")');
shouldBeFalse('internals.isLoadingFromMemoryCache("../../hidpi/resources/image-set-1x.png")');
shouldBeFalse('internals.isLoadingFromMemoryCache("resources/blue-100-px-square.png")');
}
}, false);
</script>
<img id="foo">
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment