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

Unified Diff: LayoutTests/css3/device-adapt/viewport-invalid-values-001.html

Issue 23604037: Recompute percentage based @viewport on resize. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed review issue Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/css3/device-adapt/viewport-invalid-values-001.html
diff --git a/LayoutTests/css3/device-adapt/viewport-invalid-values-001.html b/LayoutTests/css3/device-adapt/viewport-invalid-values-001.html
new file mode 100644
index 0000000000000000000000000000000000000000..c7a74229815b40c687ca985d0560c696cfb1921c
--- /dev/null
+++ b/LayoutTests/css3/device-adapt/viewport-invalid-values-001.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>'initial' and 'inherit' are invalid values for @viewport descriptors</title>
+ <script src="../../resources/testharness.js"></script>
+ <script src="../../resources/testharnessreport.js"></script>
+ <script>
+ if (window.testRunner) {
+ testRunner.enableFixedLayoutMode(true);
+ internals.settings.setViewportEnabled(true);
+ }
+ </script>
+ <style>
+ /* 'initial' and 'inherit' are invalid keywords for viewport descriptors. */
+ @viewport { min-width: initial; }
+ @viewport { min-width: inherit; }
+ </style>
+</head>
+<body>
+ <div id="log"></div>
+ <script>
+ test(function(){
+ assert_equals(document.styleSheets[0].cssRules.length, 2);
+ }, "Check that both @viewport rules are created.");
+ test(function(){
+ assert_equals(document.styleSheets[0].cssRules[0].style.length, 0);
+ }, "Check that \"min-width: initial\" is dropped.");
+ test(function(){
+ assert_equals(document.styleSheets[0].cssRules[0].style.length, 0);
+ }, "Check that \"min-width: inherit\" is dropped.");
+ </script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698