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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/images/huge-image-viewport-scale.html

Issue 2496663002: Merge css3/image/ and fast/images/ to images/ (Closed)
Patch Set: Address failing tests (3 of them) Created 4 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../resources/run-after-layout-and-paint.js"></script>
3 <script>
4 if (window.testRunner) {
5 testRunner.dumpAsText();
6 testRunner.setCanOpenWindows();
7 testRunner.waitUntilDone();
8 }
9
10 onload = function() {
11 var newWindow = window.open('resources/5000x5000.png', 'image', 'width=100,hei ght=150');
12 if (newWindow.internals)
13 newWindow.internals.settings.setViewportEnabled(true);
14 newWindow.onload = function() {
15 runAfterLayoutAndPaint(function() {
16 document.getElementById('output').textContent =
17 '\nviewport meta: ' + newWindow.document.querySelector('meta').outerHT ML
18 + '\nimage style: ' + newWindow.document.querySelector('img').getAttri bute('style')
19 + '\nimage actual width: ' + newWindow.document.querySelector('img').o ffsetWidth;
20 if (window.testRunner)
21 testRunner.notifyDone();
22 });
23 };
24 }
25 </script>
26 Tests huge image scaling when viewport is enabled. Requires DumpRenderTree.<br>
27 To manual test, open resources/5000x5000.png in a viewport-capable browser (e.g. on Android or enable viewport emulation in DevTools).<br>
28 Passes if the image shinks to fit the width.<br>
29 <pre id="output"></pre>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698