Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / HTMLImageElement / image-dynamic-width.html
blobcb6eef73abda64341963efcb545ad92b3420ed33
1 <!DOCTYPE html>
2 <script src="../../../resources/js-test.js"></script>
3 <script>
4 description("Test that creating a cached image and immediately checking its width works");
5 jsTestIsAsync = true;
6 var src = '../resources/abe.png?' + Math.random();
7 var currentResult = false;
8 function test(expected) {
9 var i = new Image();
10 i.src = src;
11 currentResult = (i.width == expected);
12 shouldBeTrue('currentResult');
14 test(0);
15 onload = function(){
16 test(76);
17 finishJSTest();
19 </script>