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

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

Issue 66383005: Remove the concept of user stylesheets. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix WebFrameCSSCallbackTest tests 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
« no previous file with comments | « no previous file | LayoutTests/css3/device-adapt/viewport-initial-height-zero.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>Viewport 'height' descriptor has 'extend-to-zoom' value</title> 4 <title>Viewport 'height' 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 { height: -internal-extend-to-zoom; zoom: 2.0; } 9 @viewport { height: -internal-extend-to-zoom; zoom: 2.0; }
10 </style> 10 </style>
11 <script> 11 <script>
12 test(function(){ 12 test(function(){
13 assert_own_property(window, "testRunner"); 13 assert_own_property(window, "testRunner");
14 }, "Check that window.testRunner is present. Required to add a user styl esheet."); 14 }, "Check that window.testRunner is present. Required to add a user styl esheet.");
15 15
16 if (window.testRunner) { 16 if (window.testRunner) {
17 testRunner.addUserStyleSheet("@viewport { width: -internal-extend-to -zoom 980px; min-zoom: 0.25; max-zoom: 5; height: auto ; zoom: auto; user-zoom: zoom; orientation: auto }", true); 17 testRunner.injectStyleSheet("@viewport { width: -internal-extend-to- zoom 980px; min-zoom: 0.25; max-zoom: 5; height: auto ; zoom: auto; user-zoom: z oom; orientation: auto }", true);
18 } 18 }
19 </script> 19 </script>
20 </head> 20 </head>
21 <body> 21 <body>
22 <div id="log"></div> 22 <div id="log"></div>
23 <script> 23 <script>
24 test(function(){ 24 test(function(){
25 assert_own_property(window, "internals"); 25 assert_own_property(window, "internals");
26 }, "Check that window.internals is present. Required to call viewportAsT ext."); 26 }, "Check that window.internals is present. Required to call viewportAsT ext.");
27 27
28 var actualWidth; 28 var actualWidth;
29 var actualHeight; 29 var actualHeight;
30 30
31 var vpString = internals.viewportAsText(document, 1, 320, 352); 31 var vpString = internals.viewportAsText(document, 1, 320, 352);
32 var match = /viewport size (.+)x(.+) scale (.+ )/.exec(vpString); 32 var match = /viewport size (.+)x(.+) scale (.+ )/.exec(vpString);
33 33
34 if (match) { 34 if (match) {
35 actualHeight = parseFloat(match[2]); 35 actualHeight = parseFloat(match[2]);
36 } 36 }
37 37
38 test(function(){ 38 test(function(){
39 assert_equals(actualHeight, 176); 39 assert_equals(actualHeight, 176);
40 }, "Check viewport height."); 40 }, "Check viewport height.");
41 </script> 41 </script>
42 </body> 42 </body>
43 </html> 43 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/css3/device-adapt/viewport-initial-height-zero.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698