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

Side by Side Diff: LayoutTests/css3/device-adapt/viewport-user-style.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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>User stylesheet containing an @viewport rule</title> 4 <title>User stylesheet containing an @viewport rule</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 9
10 @viewport { 10 @viewport {
11 height: 2000px; 11 height: 2000px;
12 } 12 }
13 </style> 13 </style>
14 <script> 14 <script>
15 test(function(){ 15 test(function(){
16 assert_own_property(window, "testRunner"); 16 assert_own_property(window, "testRunner");
17 }, "Check that window.testRunner is present. Required to add a user styl esheet."); 17 }, "Check that window.testRunner is present. Required to add a user styl esheet.");
18 18
19 if (window.testRunner) { 19 if (window.testRunner) {
20 testRunner.addUserStyleSheet("@viewport { width: 450px; height: auto ; zoom: auto; min-zoom: auto; max-zoom: auto }", true); 20 testRunner.injectStyleSheet("@viewport { width: 450px; height: auto; zoom: auto; min-zoom: auto; max-zoom: auto }", true);
21 } 21 }
22 </script> 22 </script>
23 </head> 23 </head>
24 <body> 24 <body>
25 <div id="log"></div> 25 <div id="log"></div>
26 <script> 26 <script>
27 test(function(){ 27 test(function(){
28 assert_own_property(window, "internals"); 28 assert_own_property(window, "internals");
29 }, "Check that window.internals is present. Required to call viewportAsT ext."); 29 }, "Check that window.internals is present. Required to call viewportAsT ext.");
30 30
(...skipping 13 matching lines...) Expand all
44 test(function(){ 44 test(function(){
45 assert_equals(actualWidth, 450); 45 assert_equals(actualWidth, 450);
46 }, "Check that we get the viewport width from the user stylesheet."); 46 }, "Check that we get the viewport width from the user stylesheet.");
47 47
48 test(function(){ 48 test(function(){
49 assert_equals(actualHeight, 2000); 49 assert_equals(actualHeight, 2000);
50 }, "Check that we get the viewport height from the author stylesheet."); 50 }, "Check that we get the viewport height from the author stylesheet.");
51 </script> 51 </script>
52 </body> 52 </body>
53 </html> 53 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698