Title: [135989] trunk/LayoutTests
Revision
135989
Author
[email protected]
Date
2012-11-28 02:05:31 -0800 (Wed, 28 Nov 2012)

Log Message

Merge tests for date pseudo classes into one
https://bugs.webkit.org/show_bug.cgi?id=103489

Reviewed by Kentaro Hara.

date-appearance-pseudo-classes.html doesn't need to be a pixel
test because "how css properties are applied" is tested in
date-appearance-basic.html. Checking querySelectorAll result is
enough to check pseudo classes support, and we can convert the
test to a dumpAsText test.

Also, we should remove type=date dependencies in
fast/css/pseudo-*.html because some platforms don't enable
INPUT_TYPE_DATE and we had better put such tests into one place,
fast/forms/date/.

* fast/css/pseudo-in-range-expected.txt:
* fast/css/pseudo-in-range-invalid-value-expected.txt:
* fast/css/pseudo-out-of-range-expected.txt:
* fast/css/script-tests/pseudo-in-range-invalid-value.js:
* fast/css/script-tests/pseudo-in-range.js:
* fast/css/script-tests/pseudo-out-of-range.js:
* fast/forms/date/date-appearance-pseudo-classes-expected.txt: Removed.
* fast/forms/date/date-appearance-pseudo-classes.html: Removed.
* fast/forms/date/date-pseudo-classes-expected.txt: Added.
* fast/forms/date/date-pseudo-classes.html: Added.
* fast/forms/resources/common-pseudo-classes.js: Added.
* platform/chromium-linux/fast/forms/date/date-appearance-pseudo-classes-expected.png: Removed.
* platform/chromium-mac-lion/fast/forms/date/date-appearance-pseudo-classes-expected.png: Removed.
* platform/chromium-mac-snowleopard/fast/forms/date/date-appearance-pseudo-classes-expected.png: Removed.
* platform/chromium-mac/fast/forms/date/date-appearance-pseudo-classes-expected.png: Removed.
* platform/chromium-win/fast/forms/date/date-appearance-pseudo-classes-expected.png: Removed.
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt/TestExpectations:
* platform/win/TestExpectations:

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (135988 => 135989)


--- trunk/LayoutTests/ChangeLog	2012-11-28 09:54:01 UTC (rev 135988)
+++ trunk/LayoutTests/ChangeLog	2012-11-28 10:05:31 UTC (rev 135989)
@@ -1,3 +1,43 @@
+2012-11-28  Kent Tamura  <[email protected]>
+
+        Merge tests for date pseudo classes into one
+        https://bugs.webkit.org/show_bug.cgi?id=103489
+
+        Reviewed by Kentaro Hara.
+
+        date-appearance-pseudo-classes.html doesn't need to be a pixel
+        test because "how css properties are applied" is tested in
+        date-appearance-basic.html. Checking querySelectorAll result is
+        enough to check pseudo classes support, and we can convert the
+        test to a dumpAsText test.
+
+        Also, we should remove type=date dependencies in
+        fast/css/pseudo-*.html because some platforms don't enable
+        INPUT_TYPE_DATE and we had better put such tests into one place,
+        fast/forms/date/.
+
+        * fast/css/pseudo-in-range-expected.txt:
+        * fast/css/pseudo-in-range-invalid-value-expected.txt:
+        * fast/css/pseudo-out-of-range-expected.txt:
+        * fast/css/script-tests/pseudo-in-range-invalid-value.js:
+        * fast/css/script-tests/pseudo-in-range.js:
+        * fast/css/script-tests/pseudo-out-of-range.js:
+        * fast/forms/date/date-appearance-pseudo-classes-expected.txt: Removed.
+        * fast/forms/date/date-appearance-pseudo-classes.html: Removed.
+        * fast/forms/date/date-pseudo-classes-expected.txt: Added.
+        * fast/forms/date/date-pseudo-classes.html: Added.
+        * fast/forms/resources/common-pseudo-classes.js: Added.
+        * platform/chromium-linux/fast/forms/date/date-appearance-pseudo-classes-expected.png: Removed.
+        * platform/chromium-mac-lion/fast/forms/date/date-appearance-pseudo-classes-expected.png: Removed.
+        * platform/chromium-mac-snowleopard/fast/forms/date/date-appearance-pseudo-classes-expected.png: Removed.
+        * platform/chromium-mac/fast/forms/date/date-appearance-pseudo-classes-expected.png: Removed.
+        * platform/chromium-win/fast/forms/date/date-appearance-pseudo-classes-expected.png: Removed.
+        * platform/efl/TestExpectations:
+        * platform/gtk/TestExpectations:
+        * platform/mac/TestExpectations:
+        * platform/qt/TestExpectations:
+        * platform/win/TestExpectations:
+
 2012-11-28  Tommy Widenflycht  <[email protected]>
 
         Add basic implementation for MediaStreamAudioDestinationNode

Modified: trunk/LayoutTests/fast/css/pseudo-in-range-expected.txt (135988 => 135989)


--- trunk/LayoutTests/fast/css/pseudo-in-range-expected.txt	2012-11-28 09:54:01 UTC (rev 135988)
+++ trunk/LayoutTests/fast/css/pseudo-in-range-expected.txt	2012-11-28 10:05:31 UTC (rev 135989)
@@ -5,8 +5,7 @@
 
 PASS document.querySelector("input[type=number]:in-range").id is "number1"
 PASS document.querySelector("input[type=range]:in-range").id is "range1"
-PASS document.querySelector("input[type=date]:in-range").id is "date1"
-PASS document.querySelectorAll(":in-range").length is 3
+PASS document.querySelectorAll(":in-range").length is 2
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/fast/css/pseudo-in-range-invalid-value-expected.txt (135988 => 135989)


--- trunk/LayoutTests/fast/css/pseudo-in-range-invalid-value-expected.txt	2012-11-28 09:54:01 UTC (rev 135988)
+++ trunk/LayoutTests/fast/css/pseudo-in-range-invalid-value-expected.txt	2012-11-28 10:05:31 UTC (rev 135989)
@@ -5,8 +5,7 @@
 
 PASS document.querySelector("input[type=number]:in-range").id is "number1"
 PASS document.querySelector("input[type=range]:in-range").id is "range1"
-PASS document.querySelector("input[type=date]:in-range").id is "date1"
-PASS document.querySelectorAll(":in-range").length is 3
+PASS document.querySelectorAll(":in-range").length is 2
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/fast/css/pseudo-out-of-range-expected.txt (135988 => 135989)


--- trunk/LayoutTests/fast/css/pseudo-out-of-range-expected.txt	2012-11-28 09:54:01 UTC (rev 135988)
+++ trunk/LayoutTests/fast/css/pseudo-out-of-range-expected.txt	2012-11-28 10:05:31 UTC (rev 135989)
@@ -4,12 +4,10 @@
 
 
 PASS document.querySelector("input[type=number]:out-of-range").id is "number1"
-PASS document.querySelector("input[type=date]:out-of-range").id is "date1"
-PASS document.querySelectorAll(":out-of-range").length is 2
+PASS document.querySelectorAll(":out-of-range").length is 1
 
 When the value becomes in-range dynamically, we do not find the control anymore
 PASS document.querySelector("input[type=number]:out-of-range") is null
-PASS document.querySelector("input[type=date]:out-of-range") is null
 PASS document.querySelectorAll(":out-of-range").length is 0
 PASS successfullyParsed is true
 

Modified: trunk/LayoutTests/fast/css/script-tests/pseudo-in-range-invalid-value.js (135988 => 135989)


--- trunk/LayoutTests/fast/css/script-tests/pseudo-in-range-invalid-value.js	2012-11-28 09:54:01 UTC (rev 135988)
+++ trunk/LayoutTests/fast/css/script-tests/pseudo-in-range-invalid-value.js	2012-11-28 10:05:31 UTC (rev 135989)
@@ -2,9 +2,8 @@
 
 var parentDiv = document.createElement('div');
 document.body.appendChild(parentDiv);
-parentDiv.innerHTML = '<input id="number1" type="number" min=0 max=10 value="ABC"><input id="range1" type="range" min=0 max=10 value="ABC"><input id="date1" type="date" min="2010-12-28" max="2010-12-28" value="ABC"><input id="text1" type="text" min=0 max=10 value="ABC"><input id="checkbox1" type="checkbox">    <input id="radio1" type="radio">';
+parentDiv.innerHTML = '<input id="number1" type="number" min=0 max=10 value="ABC"><input id="range1" type="range" min=0 max=10 value="ABC"><input id="text1" type="text" min=0 max=10 value="ABC"><input id="checkbox1" type="checkbox">    <input id="radio1" type="radio">';
 
 shouldBe('document.querySelector("input[type=number]:in-range").id', '"number1"');
 shouldBe('document.querySelector("input[type=range]:in-range").id', '"range1"');
-shouldBe('document.querySelector("input[type=date]:in-range").id', '"date1"');
-shouldBe('document.querySelectorAll(":in-range").length', '3');
+shouldBe('document.querySelectorAll(":in-range").length', '2');

Modified: trunk/LayoutTests/fast/css/script-tests/pseudo-in-range.js (135988 => 135989)


--- trunk/LayoutTests/fast/css/script-tests/pseudo-in-range.js	2012-11-28 09:54:01 UTC (rev 135988)
+++ trunk/LayoutTests/fast/css/script-tests/pseudo-in-range.js	2012-11-28 10:05:31 UTC (rev 135989)
@@ -2,9 +2,8 @@
 
 var parentDiv = document.createElement('div');
 document.body.appendChild(parentDiv);
-parentDiv.innerHTML = '<input id="number1" type="number" min=0 max=10 value=5><input id="range1" type="range" min=0 max=10 value=5><input id="date1" type="date" min="2010-12-28" max="2010-12-30" value="2010-12-29"><input id="text1" type="text" min=0 max=10 value=5><input id="checkbox1" type="checkbox">    <input id="radio1" type="radio">';
+parentDiv.innerHTML = '<input id="number1" type="number" min=0 max=10 value=5><input id="range1" type="range" min=0 max=10 value=5><input id="text1" type="text" min=0 max=10 value=5><input id="checkbox1" type="checkbox">    <input id="radio1" type="radio">';
 
 shouldBe('document.querySelector("input[type=number]:in-range").id', '"number1"');
 shouldBe('document.querySelector("input[type=range]:in-range").id', '"range1"');
-shouldBe('document.querySelector("input[type=date]:in-range").id', '"date1"');
-shouldBe('document.querySelectorAll(":in-range").length', '3');
+shouldBe('document.querySelectorAll(":in-range").length', '2');

Modified: trunk/LayoutTests/fast/css/script-tests/pseudo-out-of-range.js (135988 => 135989)


--- trunk/LayoutTests/fast/css/script-tests/pseudo-out-of-range.js	2012-11-28 09:54:01 UTC (rev 135988)
+++ trunk/LayoutTests/fast/css/script-tests/pseudo-out-of-range.js	2012-11-28 10:05:31 UTC (rev 135989)
@@ -2,17 +2,14 @@
 
 var parentDiv = document.createElement('div');
 document.body.appendChild(parentDiv);
-parentDiv.innerHTML = '<input id="number1" type="number" min=0 max=10 value=50><input id="date1" type="date" min="2010-12-28" max="2010-12-30" value="2011-01-01"><input id="text1" type="text" min=0 max=10 value=50><input id="checkbox1" type="checkbox"><input id="radio1" type="radio">';
+parentDiv.innerHTML = '<input id="number1" type="number" min=0 max=10 value=50><input id="text1" type="text" min=0 max=10 value=50><input id="checkbox1" type="checkbox"><input id="radio1" type="radio">';
 
 shouldBe('document.querySelector("input[type=number]:out-of-range").id', '"number1"');
-shouldBe('document.querySelector("input[type=date]:out-of-range").id', '"date1"');
-shouldBe('document.querySelectorAll(":out-of-range").length', '2');
+shouldBe('document.querySelectorAll(":out-of-range").length', '1');
 
 debug("");
 debug("When the value becomes in-range dynamically, we do not find the control anymore");
 document.getElementById("number1").value = 5;
-document.getElementById("date1").value = "2010-12-28";
 
 shouldBe('document.querySelector("input[type=number]:out-of-range")', 'null');
-shouldBe('document.querySelector("input[type=date]:out-of-range")', 'null');
 shouldBe('document.querySelectorAll(":out-of-range").length', '0');

Deleted: trunk/LayoutTests/fast/forms/date/date-appearance-pseudo-classes-expected.txt (135988 => 135989)


--- trunk/LayoutTests/fast/forms/date/date-appearance-pseudo-classes-expected.txt	2012-11-28 09:54:01 UTC (rev 135988)
+++ trunk/LayoutTests/fast/forms/date/date-appearance-pseudo-classes-expected.txt	2012-11-28 10:05:31 UTC (rev 135989)
@@ -1,10 +0,0 @@
-Input Type "date"
-
-Pseudo Classes
-
-:enabled, :valid	
-:disabled	
-:invalid	
-:in-range	
-:out-of-range	
-:read-only	

Deleted: trunk/LayoutTests/fast/forms/date/date-appearance-pseudo-classes.html (135988 => 135989)


--- trunk/LayoutTests/fast/forms/date/date-appearance-pseudo-classes.html	2012-11-28 09:54:01 UTC (rev 135988)
+++ trunk/LayoutTests/fast/forms/date/date-appearance-pseudo-classes.html	2012-11-28 10:05:31 UTC (rev 135989)
@@ -1,29 +0,0 @@
-<html>
-<head>
-<style type="text/css">
-:disabled { color: gray; }
-:enabled { color: blue; }
-:invalid { color: pink; }
-:in-range { font-weight: bold; }
-:out-of-range { color: red; }
-:read-only { color: yellow; }
-:valid { color: green; }
-</style>
-</head>
-<body>
-<h1>Input Type "date"</h1>
-<h2>Pseudo Classes</h2>
-<table>
-<tr><th>:enabled, :valid</th><td><input type="date" value="1234-12-11"></td></tr>
-<tr><th>:disabled</th><td><input type="date" value="12340-10-01" disabled></td></tr>
-<tr><th>:invalid</th><td><input type="date" value="123456-12-11" min="123456-12-10" step="2"></td></tr>
-<tr><th>:in-range</th><td><input type="date" value="123456-12-11" min="123456-12-01" max="123456-12-31"></td></tr>
-<tr><th>:out-of-range</th><td><input type="date" value="0710-03-10" min="1000-01-01" max="1999-12-31"></td></tr>
-<tr><th>:read-only</th><td><input type="date" value="1999-12-31" readonly></td></tr>
-</table>
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText(true);
-</script>
-</body>
-</html>

Added: trunk/LayoutTests/fast/forms/date/date-pseudo-classes-expected.txt (0 => 135989)


--- trunk/LayoutTests/fast/forms/date/date-pseudo-classes-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/date/date-pseudo-classes-expected.txt	2012-11-28 10:05:31 UTC (rev 135989)
@@ -0,0 +1,21 @@
+Test if an input field matches to various pseudo classes
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS matchedNodesContainId(container, ":enabled", "enabled") is true
+PASS matchedNodesContainId(container, ":valid", "enabled") is true
+PASS matchedNodesContainId(container, ":optional", "enabled") is true
+PASS matchedNodesContainId(container, ":read-write", "enabled") is true
+PASS matchedNodesContainId(container, ":disabled", "disabled") is true
+PASS matchedNodesContainId(container, ":invalid", "invalid") is true
+PASS matchedNodesContainId(container, ":in-range", "inrange") is true
+PASS matchedNodesContainId(container, ":in-range", "badvalue") is true
+PASS matchedNodesContainId(container, ":out-of-range", "outofrange") is true
+PASS matchedNodesContainId(container, ":read-only", "readonly") is true
+PASS matchedNodesContainId(container, ":required", "required") is true
+PASS matchedNodesContainId(container, ":out-of-range", "outofrange") is false
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/fast/forms/date/date-pseudo-classes.html (0 => 135989)


--- trunk/LayoutTests/fast/forms/date/date-pseudo-classes.html	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/date/date-pseudo-classes.html	2012-11-28 10:05:31 UTC (rev 135989)
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<body>
+<script src=""
+<script src=""
+
+<div id="container">
+<input type="date" value="1234-12-11" id="enabled">
+<input type="date" value="12340-10-01" id="disabled" disabled>
+<input type="date" value="123456-12-11" min="123456-12-10" step="2" id="invalid">
+<input type="date" value="123456-12-11" min="123456-12-01" max="123456-12-31" id="inrange">
+<input type="date" value="ABC" min="123456-12-01" max="123456-12-31" id="badvalue">
+<input type="date" value="0710-03-10" min="1000-01-01" max="1999-12-31" id="outofrange">
+<input type="date" value="1999-12-31" readonly id="readonly">
+<input type="date" value="1999-12-31" required id="required">
+</div>
+
+<script>
+description('Test if an input field matches to various pseudo classes');
+var container = document.getElementById('container');
+shouldBeTrue('matchedNodesContainId(container, ":enabled", "enabled")');
+shouldBeTrue('matchedNodesContainId(container, ":valid", "enabled")');
+shouldBeTrue('matchedNodesContainId(container, ":optional", "enabled")');
+shouldBeTrue('matchedNodesContainId(container, ":read-write", "enabled")');
+shouldBeTrue('matchedNodesContainId(container, ":disabled", "disabled")');
+shouldBeTrue('matchedNodesContainId(container, ":invalid", "invalid")');
+shouldBeTrue('matchedNodesContainId(container, ":in-range", "inrange")');
+shouldBeTrue('matchedNodesContainId(container, ":in-range", "badvalue")');
+shouldBeTrue('matchedNodesContainId(container, ":out-of-range", "outofrange")');
+shouldBeTrue('matchedNodesContainId(container, ":read-only", "readonly")');
+shouldBeTrue('matchedNodesContainId(container, ":required", "required")');
+document.getElementById('outofrange').value = '1500-01-01';
+shouldBeFalse('matchedNodesContainId(container, ":out-of-range", "outofrange")');
+container.remove();
+</script>
+<script src=""
+</body>

Added: trunk/LayoutTests/fast/forms/resources/common-pseudo-classes.js (0 => 135989)


--- trunk/LayoutTests/fast/forms/resources/common-pseudo-classes.js	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/resources/common-pseudo-classes.js	2012-11-28 10:05:31 UTC (rev 135989)
@@ -0,0 +1,8 @@
+function matchedNodesContainId(root, selector, expectedId) {
+    var matchedNodes = root.querySelectorAll(selector);
+    for (var i = 0; i < matchedNodes.length; ++i) {
+        if (matchedNodes[i].id == expectedId)
+            return true;
+    }
+    return false;
+}

Deleted: trunk/LayoutTests/platform/chromium-linux/fast/forms/date/date-appearance-pseudo-classes-expected.png


(Binary files differ)

Deleted: trunk/LayoutTests/platform/chromium-mac/fast/forms/date/date-appearance-pseudo-classes-expected.png


(Binary files differ)

Deleted: trunk/LayoutTests/platform/chromium-mac-lion/fast/forms/date/date-appearance-pseudo-classes-expected.png


(Binary files differ)

Deleted: trunk/LayoutTests/platform/chromium-mac-snowleopard/fast/forms/date/date-appearance-pseudo-classes-expected.png


(Binary files differ)

Deleted: trunk/LayoutTests/platform/chromium-win/fast/forms/date/date-appearance-pseudo-classes-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/efl/TestExpectations (135988 => 135989)


--- trunk/LayoutTests/platform/efl/TestExpectations	2012-11-28 09:54:01 UTC (rev 135988)
+++ trunk/LayoutTests/platform/efl/TestExpectations	2012-11-28 10:05:31 UTC (rev 135989)
@@ -1183,11 +1183,6 @@
 
 webkit.org/b/49142 fast/css/style-scoped [ Skip ]
 
-# ENABLE(INPUT_TYPE_*) are not enabled.
-webkit.org/b/29359 fast/css/pseudo-in-range.html [ Failure ]
-webkit.org/b/29359 fast/css/pseudo-out-of-range.html [ Failure ]
-webkit.org/b/29359 fast/css/pseudo-in-range-invalid-value.html [ Failure ]
-
 # These tests require TOUCH_ADJUSTMENT flag to be enabled
 webkit.org/b/78801 touchadjustment
 

Modified: trunk/LayoutTests/platform/gtk/TestExpectations (135988 => 135989)


--- trunk/LayoutTests/platform/gtk/TestExpectations	2012-11-28 09:54:01 UTC (rev 135988)
+++ trunk/LayoutTests/platform/gtk/TestExpectations	2012-11-28 10:05:31 UTC (rev 135989)
@@ -185,9 +185,6 @@
 webkit.org/b/98935 fast/forms/color [ Skip ]
 
 # ENABLE_INPUT_TYPE_* are not enabled.
-webkit.org/b/98936 fast/css/pseudo-in-range.html [ Failure ]
-webkit.org/b/98936 fast/css/pseudo-out-of-range.html [ Failure ]
-webkit.org/b/98936 fast/css/pseudo-in-range-invalid-value.html [ Failure ]
 webkit.org/b/98936 fast/forms/date [ Skip ]
 webkit.org/b/98936 fast/forms/date-multiple-fields [ Skip ]
 webkit.org/b/98936 fast/forms/datetime [ Skip ]

Modified: trunk/LayoutTests/platform/mac/TestExpectations (135988 => 135989)


--- trunk/LayoutTests/platform/mac/TestExpectations	2012-11-28 09:54:01 UTC (rev 135988)
+++ trunk/LayoutTests/platform/mac/TestExpectations	2012-11-28 10:05:31 UTC (rev 135989)
@@ -176,9 +176,6 @@
 # ENABLE_INPUT_TYPE_* are not enabled.
 # https://bugs.webkit.org/show_bug.cgi?id=29359
 fast/forms/date
-fast/css/pseudo-in-range.html
-fast/css/pseudo-out-of-range.html
-fast/css/pseudo-in-range-invalid-value.html
 fast/forms/datetime
 fast/forms/datetimelocal
 fast/forms/month

Modified: trunk/LayoutTests/platform/qt/TestExpectations (135988 => 135989)


--- trunk/LayoutTests/platform/qt/TestExpectations	2012-11-28 09:54:01 UTC (rev 135988)
+++ trunk/LayoutTests/platform/qt/TestExpectations	2012-11-28 10:05:31 UTC (rev 135989)
@@ -80,9 +80,6 @@
 # ENABLE(INPUT_TYPE_*) are not enabled.
 # https://bugs.webkit.org/show_bug.cgi?id=29359
 fast/forms/date
-fast/css/pseudo-in-range.html
-fast/css/pseudo-out-of-range.html
-fast/css/pseudo-in-range-invalid-value.html
 fast/forms/datetime
 fast/forms/datetimelocal
 fast/forms/month

Modified: trunk/LayoutTests/platform/win/TestExpectations (135988 => 135989)


--- trunk/LayoutTests/platform/win/TestExpectations	2012-11-28 09:54:01 UTC (rev 135988)
+++ trunk/LayoutTests/platform/win/TestExpectations	2012-11-28 10:05:31 UTC (rev 135989)
@@ -1184,9 +1184,6 @@
 # ENABLE_INPUT_TYPE_* are not enabled.
 # https://bugs.webkit.org/show_bug.cgi?id=29359
 fast/forms/date
-fast/css/pseudo-in-range.html
-fast/css/pseudo-out-of-range.html
-fast/css/pseudo-in-range-invalid-value.html
 fast/forms/datetime
 fast/forms/datetimelocal
 fast/forms/month
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to