Title: [173227] trunk/LayoutTests
- Revision
- 173227
- Author
- benja...@webkit.org
- Date
- 2014-09-03 14:25:08 -0700 (Wed, 03 Sep 2014)
Log Message
Add a test case for Element.matches() with :scope
https://bugs.webkit.org/show_bug.cgi?id=136475
Reviewed by Andreas Kling.
There was not test for this use case. Looks like everything works fine.
* fast/selectors/matches-scope-expected.txt: Added.
* fast/selectors/matches-scope.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (173226 => 173227)
--- trunk/LayoutTests/ChangeLog 2014-09-03 21:18:05 UTC (rev 173226)
+++ trunk/LayoutTests/ChangeLog 2014-09-03 21:25:08 UTC (rev 173227)
@@ -1,3 +1,15 @@
+2014-09-03 Benjamin Poulain <benja...@webkit.org>
+
+ Add a test case for Element.matches() with :scope
+ https://bugs.webkit.org/show_bug.cgi?id=136475
+
+ Reviewed by Andreas Kling.
+
+ There was not test for this use case. Looks like everything works fine.
+
+ * fast/selectors/matches-scope-expected.txt: Added.
+ * fast/selectors/matches-scope.html: Added.
+
2014-09-03 David Hyatt <hy...@apple.com>
Add support for the initial-letter CSS property to first-letter
Added: trunk/LayoutTests/fast/selectors/matches-scope-expected.txt (0 => 173227)
--- trunk/LayoutTests/fast/selectors/matches-scope-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/selectors/matches-scope-expected.txt 2014-09-03 21:25:08 UTC (rev 173227)
@@ -0,0 +1,27 @@
+This test makes sure that :scope works correctly with the matches() API.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS theTarget.matches(":scope") is true
+PASS theTarget.matches(":not(:scope)") is false
+PASS theTarget.matches("body :scope") is true
+PASS theTarget.matches("body>:scope") is true
+PASS theTarget.matches("sibling + :scope") is true
+PASS theTarget.matches("sibling ~ :scope") is true
+PASS theTarget.matches("#theTarget:scope") is true
+PASS theTarget.matches(":scope#theTarget") is true
+PASS theTarget.matches("[webkit]:scope#theTarget") is true
+PASS theTarget.matches(":not([webkit=fast]):scope#theTarget") is false
+PASS theTarget.matches(":scope target") is false
+PASS theTarget.matches(":scope > target") is false
+PASS theTarget.matches(":scope + target") is false
+PASS theTarget.matches(":scope ~ target") is false
+PASS theTarget.matches(":scope *") is false
+PASS theTarget.matches(":scope > *") is false
+PASS theTarget.matches(":scope + *") is false
+PASS theTarget.matches(":scope ~ *") is false
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/fast/selectors/matches-scope.html (0 => 173227)
--- trunk/LayoutTests/fast/selectors/matches-scope.html (rev 0)
+++ trunk/LayoutTests/fast/selectors/matches-scope.html 2014-09-03 21:25:08 UTC (rev 173227)
@@ -0,0 +1,44 @@
+<!doctype html>
+<html>
+<head>
+<script src=""
+<script>
+if (window.testRunner)
+ testRunner.dumpAsText();
+</script>
+</head>
+<body>
+ <sibling></sibling>
+ <target id="theTarget" webkit="fast"></target>
+</body>
+<script>
+description('This test makes sure that :scope works correctly with the matches() API.');
+
+var theTarget = document.getElementById('theTarget');
+shouldBeTrue('theTarget.matches(":scope")');
+shouldBeFalse('theTarget.matches(":not(:scope)")');
+
+shouldBeTrue('theTarget.matches("body :scope")');
+shouldBeTrue('theTarget.matches("body>:scope")');
+
+shouldBeTrue('theTarget.matches("sibling + :scope")');
+shouldBeTrue('theTarget.matches("sibling ~ :scope")');
+
+shouldBeTrue('theTarget.matches("#theTarget:scope")');
+shouldBeTrue('theTarget.matches(":scope#theTarget")');
+
+shouldBeTrue('theTarget.matches("[webkit]:scope#theTarget")');
+shouldBeFalse('theTarget.matches(":not([webkit=fast]):scope#theTarget")');
+
+shouldBeFalse('theTarget.matches(":scope target")');
+shouldBeFalse('theTarget.matches(":scope > target")');
+shouldBeFalse('theTarget.matches(":scope + target")');
+shouldBeFalse('theTarget.matches(":scope ~ target")');
+
+shouldBeFalse('theTarget.matches(":scope *")');
+shouldBeFalse('theTarget.matches(":scope > *")');
+shouldBeFalse('theTarget.matches(":scope + *")');
+shouldBeFalse('theTarget.matches(":scope ~ *")');
+</script>
+<script src=""
+</html>
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes