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

Side by Side Diff: LayoutTests/css3/device-adapt/viewport-width-extend-to-zoom.html

Issue 1197733009: Prepare LayoutTests for lazy loading testRunner and internals. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 months 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>Viewport 'width' descriptor has 'extend-to-zoom' value</title> 4 <title>Viewport 'width' descriptor has 'extend-to-zoom' value</title>
5 <script src="../../resources/testharness.js"></script> 5 <script src="../../resources/testharness.js"></script>
6 <script src="../../resources/testharnessreport.js"></script> 6 <script src="../../resources/testharnessreport.js"></script>
7 <style> 7 <style>
8 html, body { width: 100%; height: 100%; margin: 0 } 8 html, body { width: 100%; height: 100%; margin: 0 }
9 @viewport { width: -internal-extend-to-zoom; zoom: 0.5; } 9 @viewport { width: -internal-extend-to-zoom; zoom: 0.5; }
10 </style> 10 </style>
11 </head> 11 </head>
12 <body> 12 <body>
13 <div id="log"></div> 13 <div id="log"></div>
14 <script> 14 <script>
15 test(function(){ 15 test(function(){
16 assert_own_property(window, "internals"); 16 assert_true(window.internals instanceof Object);
17 }, "Check that window.internals is present. Required to call viewportAsT ext."); 17 }, "Check that window.internals is present. Required to call viewportAsT ext.");
18 18
19 var actualWidth; 19 var actualWidth;
20 var actualHeight; 20 var actualHeight;
21 21
22 var vpString = internals.viewportAsText(document, 1, 320, 352); 22 var vpString = internals.viewportAsText(document, 1, 320, 352);
23 var match = /viewport size (.+)x(.+) scale (.+ )/.exec(vpString); 23 var match = /viewport size (.+)x(.+) scale (.+ )/.exec(vpString);
24 24
25 if (match) { 25 if (match) {
26 actualWidth = parseFloat(match[1]); 26 actualWidth = parseFloat(match[1]);
27 } 27 }
28 28
29 test(function(){ 29 test(function(){
30 assert_equals(actualWidth, 640); 30 assert_equals(actualWidth, 640);
31 }, "Check viewport width."); 31 }, "Check viewport width.");
32 </script> 32 </script>
33 </body> 33 </body>
34 </html> 34 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698