Title: [102350] trunk/LayoutTests
Revision
102350
Author
[email protected]
Date
2011-12-08 10:53:11 -0800 (Thu, 08 Dec 2011)

Log Message

Added a test for css number types problem.
It's testing the css number types parser, where 'px' defined like escape sequences (\70\78) or uppercase / lowercase.
https://bugs.webkit.org/show_bug.cgi?id=72007

Patch by Szilard Ledan <[email protected]> on 2011-12-08
Reviewed by Darin Adler.

* fast/css/parsing-css-number-types-expected.txt: Added.
* fast/css/parsing-css-number-types.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (102349 => 102350)


--- trunk/LayoutTests/ChangeLog	2011-12-08 18:50:41 UTC (rev 102349)
+++ trunk/LayoutTests/ChangeLog	2011-12-08 18:53:11 UTC (rev 102350)
@@ -1,3 +1,14 @@
+2011-12-08  Szilard Ledan  <[email protected]>
+
+        Added a test for css number types problem.
+        It's testing the css number types parser, where 'px' defined like escape sequences (\70\78) or uppercase / lowercase.
+        https://bugs.webkit.org/show_bug.cgi?id=72007
+
+        Reviewed by Darin Adler.
+
+        * fast/css/parsing-css-number-types-expected.txt: Added.
+        * fast/css/parsing-css-number-types.html: Added.
+
 2011-12-08  Tony Chang  <[email protected]>
 
         [chromium] Rebaseline printing/width-overflow.html on Chromium Mac Leopard.

Added: trunk/LayoutTests/fast/css/parsing-css-number-types-expected.txt (0 => 102350)


--- trunk/LayoutTests/fast/css/parsing-css-number-types-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/css/parsing-css-number-types-expected.txt	2011-12-08 18:53:11 UTC (rev 102350)
@@ -0,0 +1,44 @@
+Test parsing of CSS number types.
+
+FAILURE
+
+Rules from the stylesheet:
+
+#a { font-size: 1em; }
+#b { }
+#c { }
+#d { }
+#e { font-size: 1rem; }
+#f { }
+#g { font-size: 16px; }
+#h { font-size: 16px; }
+#i { }
+#j { }
+#k { font-size: 1cm; }
+#l { }
+#m { font-size: 1in; }
+#n { font-size: 12pt; }
+#o { }
+#p { }
+#q { font-size: 100%; }
+Expected result:
+
+#a { font-size: 1em; }
+#b { font-size: 1em; }
+#c { font-size: 1em; }
+#d { font-size: 1em; }
+#e { font-size: 1rem; }
+#f { font-size: 1ex; }
+#g { font-size: 16px; }
+#h { font-size: 16px; }
+#i { font-size: 16px; }
+#j { font-size: 16px; }
+#k { font-size: 1cm; }
+#l { font-size: 1mm; }
+#m { font-size: 1in; }
+#n { font-size: 12pt; }
+#o { font-size: 16px; }
+#p { font-size: 1pc; }
+#q { font-size: 100%; }
+
+

Added: trunk/LayoutTests/fast/css/parsing-css-number-types.html (0 => 102350)


--- trunk/LayoutTests/fast/css/parsing-css-number-types.html	                        (rev 0)
+++ trunk/LayoutTests/fast/css/parsing-css-number-types.html	2011-12-08 18:53:11 UTC (rev 102350)
@@ -0,0 +1,86 @@
+<head>
+<style>
+/* Base form of the rule: */
+/*em   */ #a { font-size: 1em; }
+/*em   */ #b { font-size: 1\65m; }
+/*em   */ #c { font-size: 1\65\6D; }
+/*em   */ #d { font-size: 1\65\6d; }
+/*rEm  */ #e { font-size: 1rEm; } /*  */
+/*Ex   */ #f { font-size: 1\45x; }
+/*px   */ #g { font-size: 16px; }
+/*Px   */ #h { font-size: 16Px; }
+/*px   */ #i { font-size: 16\70\78; }
+/*pX   */ #j { font-size: 16\70 X; }
+/*Cm   */ #k { font-size: 1Cm;}
+/*MM   */ #l { font-size: 1M\4d;}
+/*In   */ #m { font-size: 1In;}
+/*pt   */ #n { font-size: 12pt; }
+/*pt   */ #o { font-size: 16p\78; }
+/*PC   */ #p { font-size: 1\70 C;}
+/*%    */ #q { font-size: 100%;}
+/*mS    #r { pause: 2000mS; }  */
+/*KhZ   #s { pitch: 105KhZ; } */
+</style>
+
+<script>
+
+function runTest()
+{
+    if (window.layoutTestController)
+        layoutTestController.dumpAsText();
+
+    var rules = document.styleSheets[0].cssRules;
+    var text = "";
+    for (var i = 0; i < rules.length; i++) {
+        text += rules.item(i).cssText;
+        text += "\n";
+    }
+
+    document.getElementById("result").appendChild(document.createTextNode(text));
+
+    if (document.getElementById("result").firstChild.data ="" document.getElementById("expected").firstChild.data)
+        document.getElementById("message").firstChild.data = ""
+    else
+        document.getElementById("message").firstChild.data = ""
+}
+
+</script>
+
+</head>
+
+<body _onload_="runTest()">
+
+<p>Test parsing of CSS number types.</p>
+
+<p id="message">TEST DID NOT COMPLETE</p>
+
+<p>Rules from the stylesheet:</p>
+
+<pre id="result"></pre>
+
+<p>Expected result:</p>
+
+<pre id="expected">#a { font-size: 1em; }
+#b { font-size: 1em; }
+#c { font-size: 1em; }
+#d { font-size: 1em; }
+#e { font-size: 1rem; }
+#f { font-size: 1ex; }
+#g { font-size: 16px; }
+#h { font-size: 16px; }
+#i { font-size: 16px; }
+#j { font-size: 16px; }
+#k { font-size: 1cm; }
+#l { font-size: 1mm; }
+#m { font-size: 1in; }
+#n { font-size: 12pt; }
+#o { font-size: 16px; }
+#p { font-size: 1pc; }
+#q { font-size: 100%; }
+<!--#r { pause: 2000ms; }  
+#s { pitch: 105kHz; }  -->
+</pre>
+<script>
+
+</script>
+</body>
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to