Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Side by Side Diff: LayoutTests/fast/loader/display-image-unset-can-block-image-and-can-reload-in-place.html

Issue 40513003: Delete/move the remaining stale tests in TestExpectations. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: delete plugins/reentrant-update-widget-positions.html as well Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script>
4 // Setting WebKitDisplayImagesKey is asynchronous, so using queueReload and setI nterval to check when the setting actually take effect.
5
6 var intervalId;
7 var imageOnloadFired = 0;
8
9 if (window.testRunner) {
10 testRunner.dumpAsText();
11 window.internals.settings.setImagesEnabled(true);
12 testRunner.overridePreference('WebKitDisplayImagesKey', 0);
13 testRunner.queueReload();
14 }
15
16 function runTest()
17 {
18 var image = document.getElementById('image');
19 if (image.naturalHeight != 0 || image.naturalWidth != 0 || imageOnloadFired != 0) {
20 document.getElementById('result').innerHTML = 'FAILURE: Image should not be loaded when DisplayImage is unset';
21 return;
22 }
23
24 testRunner.overridePreference('WebKitDisplayImagesKey', 1);
25 document.getElementById('result').innerHTML = 'FAILURE: Image should reload in-place when DispalyImage is changes from unset to set';
26 testRunner.waitUntilDone();
27 intervalId = window.setInterval(runTestRest, 10);
28 }
29
30 function runTestRest()
31 {
32 var image = document.getElementById('image');
33 if (image.naturalHeight == 33 && image.naturalWidth == 37 && imageOnloadFire d == 1) {
34 document.getElementById('result').innerHTML = 'SUCCESS';
35 window.clearInterval(intervalId);
36 testRunner.notifyDone();
37 }
38 }
39 </script>
40 </head>
41 <body onload="runTest()">
42 Test that DisplayImages disabled can block http image and can be reloaded in-p lace when toggled.
43 <div id="result">FAILURE: Test script didn't run.</div>
44 <img id="image" src="../images/resources/oval.png" onload="imageOnloadFired=1; ">
45 </body>
46 </html>
47
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698