Title: [98504] trunk/LayoutTests
Revision
98504
Author
zherc...@webkit.org
Date
2011-10-26 11:29:55 -0700 (Wed, 26 Oct 2011)

Log Message

Add new CSS escape sequence parsing tests
https://bugs.webkit.org/show_bug.cgi?id=70909

Reviewed by Darin Adler.

Test escape various sequences terminated by \n \f \r and \r\n.

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

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (98503 => 98504)


--- trunk/LayoutTests/ChangeLog	2011-10-26 18:11:51 UTC (rev 98503)
+++ trunk/LayoutTests/ChangeLog	2011-10-26 18:29:55 UTC (rev 98504)
@@ -1,3 +1,15 @@
+2011-10-26  Zoltan Herczeg  <zherc...@webkit.org>
+
+        Add new CSS escape sequence parsing tests
+        https://bugs.webkit.org/show_bug.cgi?id=70909
+
+        Reviewed by Darin Adler.
+
+        Test escape various sequences terminated by \n \f \r and \r\n.
+
+        * fast/css/parsing-css-escapes-expected.txt: Added.
+        * fast/css/parsing-css-escapes.html: Added.
+
 2011-10-26  Ryosuke Niwa  <rn...@webkit.org>
 
         Chromium Mac editing test rebaseline.

Added: trunk/LayoutTests/fast/css/parsing-css-escapes-expected.txt (0 => 98504)


--- trunk/LayoutTests/fast/css/parsing-css-escapes-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/css/parsing-css-escapes-expected.txt	2011-10-26 18:29:55 UTC (rev 98504)
@@ -0,0 +1,19 @@
+Test parsing of CSS escapes.
+
+SUCCESS
+
+Rules from the stylesheet:
+
+#a { background-color: green; }
+#b { background-color: green; }
+#c { background-color: green; }
+#d { }
+#e { }
+Expected result:
+
+#a { background-color: green; }
+#b { background-color: green; }
+#c { background-color: green; }
+#d { }
+#e { }
+

Added: trunk/LayoutTests/fast/css/parsing-css-escapes.html (0 => 98504)


--- trunk/LayoutTests/fast/css/parsing-css-escapes.html	                        (rev 0)
+++ trunk/LayoutTests/fast/css/parsing-css-escapes.html	2011-10-26 18:29:55 UTC (rev 98504)
@@ -0,0 +1,69 @@
+<head>
+<style>
+/*
+  === Warning ===
+
+  This file intentionally contains special newline characters: \n \f \r \r\n
+  Keep them when you move the file between different OSes / file-systems
+*/
+
+/* Base form of the rule: */
+#a { background-color: green; }
+#b { b\61 C\06bG\0052o\00075n\000064-col\6Fr: green; }
+#c { b\61	c\6b
+g\72o\75
+n\64
+-color:green }
+#d { background-colo\0000072: green; /* Invalid: too many hex characters. */}
+#e { b\61ckground-color: green; /* Invalid: \0b is not a newline character. */}
+</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 escapes.</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 { background-color: green; }
+#b { background-color: green; }
+#c { background-color: green; }
+#d { }
+#e { }
+</pre>
+
+<script>
+
+</script>
+</body>
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to