Title: [136202] trunk/LayoutTests
Revision
136202
Author
[email protected]
Date
2012-11-29 21:05:44 -0800 (Thu, 29 Nov 2012)

Log Message

Add month-multiple-fields tests
https://bugs.webkit.org/show_bug.cgi?id=102046

Reviewed by Kent Tamura.

Adding tests for multiple field <input type=month>.

* fast/forms/month-multiple-fields/month-multiple-fields-ax-aria-attributes-expected.txt: Added.
* fast/forms/month-multiple-fields/month-multiple-fields-ax-aria-attributes.html: Added.
* fast/forms/month-multiple-fields/month-multiple-fields-ax-value-changed-notification-expected.txt: Added.
* fast/forms/month-multiple-fields/month-multiple-fields-ax-value-changed-notification.html: Added.
* fast/forms/month-multiple-fields/month-multiple-fields-blur-and-focus-events-expected.txt: Added.
* fast/forms/month-multiple-fields/month-multiple-fields-blur-and-focus-events.html: Added.
* fast/forms/month-multiple-fields/month-multiple-fields-change-layout-by-value-expected.txt: Added.
* fast/forms/month-multiple-fields/month-multiple-fields-change-layout-by-value.html: Added.
* fast/forms/month-multiple-fields/month-multiple-fields-mouse-events-expected.txt: Added.
* fast/forms/month-multiple-fields/month-multiple-fields-mouse-events.html: Added.
* fast/forms/month-multiple-fields/month-multiple-fields-preserve-value-after-history-back-expected.txt: Added.
* fast/forms/month-multiple-fields/month-multiple-fields-preserve-value-after-history-back.html: Added.
* fast/forms/month-multiple-fields/month-multiple-fields-reset-value-after-reloads-expected.txt: Added.
* fast/forms/month-multiple-fields/month-multiple-fields-reset-value-after-reloads.html: Added.
* fast/forms/month-multiple-fields/month-multiple-fields-spinbutton-change-and-input-events-expected.txt: Added.
* fast/forms/month-multiple-fields/month-multiple-fields-spinbutton-change-and-input-events.html: Added.
* fast/forms/month-multiple-fields/month-multiple-fields-wheel-event-expected.txt: Added.
* fast/forms/month-multiple-fields/month-multiple-fields-wheel-event.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (136201 => 136202)


--- trunk/LayoutTests/ChangeLog	2012-11-30 04:43:04 UTC (rev 136201)
+++ trunk/LayoutTests/ChangeLog	2012-11-30 05:05:44 UTC (rev 136202)
@@ -1,3 +1,31 @@
+2012-11-29  Keishi Hattori  <[email protected]>
+
+        Add month-multiple-fields tests
+        https://bugs.webkit.org/show_bug.cgi?id=102046
+
+        Reviewed by Kent Tamura.
+
+        Adding tests for multiple field <input type=month>.
+
+        * fast/forms/month-multiple-fields/month-multiple-fields-ax-aria-attributes-expected.txt: Added.
+        * fast/forms/month-multiple-fields/month-multiple-fields-ax-aria-attributes.html: Added.
+        * fast/forms/month-multiple-fields/month-multiple-fields-ax-value-changed-notification-expected.txt: Added.
+        * fast/forms/month-multiple-fields/month-multiple-fields-ax-value-changed-notification.html: Added.
+        * fast/forms/month-multiple-fields/month-multiple-fields-blur-and-focus-events-expected.txt: Added.
+        * fast/forms/month-multiple-fields/month-multiple-fields-blur-and-focus-events.html: Added.
+        * fast/forms/month-multiple-fields/month-multiple-fields-change-layout-by-value-expected.txt: Added.
+        * fast/forms/month-multiple-fields/month-multiple-fields-change-layout-by-value.html: Added.
+        * fast/forms/month-multiple-fields/month-multiple-fields-mouse-events-expected.txt: Added.
+        * fast/forms/month-multiple-fields/month-multiple-fields-mouse-events.html: Added.
+        * fast/forms/month-multiple-fields/month-multiple-fields-preserve-value-after-history-back-expected.txt: Added.
+        * fast/forms/month-multiple-fields/month-multiple-fields-preserve-value-after-history-back.html: Added.
+        * fast/forms/month-multiple-fields/month-multiple-fields-reset-value-after-reloads-expected.txt: Added.
+        * fast/forms/month-multiple-fields/month-multiple-fields-reset-value-after-reloads.html: Added.
+        * fast/forms/month-multiple-fields/month-multiple-fields-spinbutton-change-and-input-events-expected.txt: Added.
+        * fast/forms/month-multiple-fields/month-multiple-fields-spinbutton-change-and-input-events.html: Added.
+        * fast/forms/month-multiple-fields/month-multiple-fields-wheel-event-expected.txt: Added.
+        * fast/forms/month-multiple-fields/month-multiple-fields-wheel-event.html: Added.
+
 2012-11-29  Zhenyao Mo  <[email protected]>
 
         Unreviewed, WebKit gardening.

Added: trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-ax-aria-attributes-expected.txt (0 => 136202)


--- trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-ax-aria-attributes-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-ax-aria-attributes-expected.txt	2012-11-30 05:05:44 UTC (rev 136202)
@@ -0,0 +1,16 @@
+This test checks aria-help attribute of fields in multiple fields week input UI.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Non-empty value
+PASS focusedFieldValueDescription() is "AXHelp: Month, AXValueDescription: October, 1, 12"
+PASS focusedFieldValueDescription() is "AXHelp: Year, AXValueDescription: 2012, 1, 275760"
+Empty value
+PASS focusedFieldValueDescription() is "AXHelp: Year, AXValueDescription: blank, 1, 275760"
+PASS focusedFieldValueDescription() is "AXHelp: Month, AXValueDescription: blank, 1, 12"
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-ax-aria-attributes.html (0 => 136202)


--- trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-ax-aria-attributes.html	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-ax-aria-attributes.html	2012-11-30 05:05:44 UTC (rev 136202)
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+</head>
+<body>
+<input id="test" type="month" value="2012-10">
+<script>
+description('This test checks aria-help attribute of fields in multiple fields week input UI.');
+
+function focusedFieldValueDescription()
+{
+    var element = accessibilityController.focusedElement;
+    return element.helpText + ', ' +  element.valueDescription + ', ' + element.minValue + ', ' + element.maxValue;
+}
+
+var testInput = document.getElementById('test');
+
+if (!window.accessibilityController || !window.eventSender)
+    debug('Please run inside DRT or WTR.');
+else {
+    debug('Non-empty value');
+    testInput.focus();
+    shouldBeEqualToString('focusedFieldValueDescription()', 'AXHelp: Month, AXValueDescription: October, 1, 12');
+    eventSender.keyDown('\t');
+    shouldBeEqualToString('focusedFieldValueDescription()', 'AXHelp: Year, AXValueDescription: 2012, 1, 275760');
+
+    debug('Empty value');
+    eventSender.keyDown('\b');
+    shouldBeEqualToString('focusedFieldValueDescription()', 'AXHelp: Year, AXValueDescription: blank, 1, 275760');
+    eventSender.keyDown('\t', ['shiftKey']);
+    eventSender.keyDown('\b');
+    shouldBeEqualToString('focusedFieldValueDescription()', 'AXHelp: Month, AXValueDescription: blank, 1, 12');
+
+    debug('');
+    testInput.remove();
+}
+</script>
+<script src=""
+</body>
+</html>

Added: trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-ax-value-changed-notification-expected.txt (0 => 136202)


--- trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-ax-value-changed-notification-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-ax-value-changed-notification-expected.txt	2012-11-30 05:05:44 UTC (rev 136202)
@@ -0,0 +1,16 @@
+This test checks value changed accessibility notifications.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+FocusedUIElementChanged AXHelp: Month=AXValueDescription: October
+FocusedUIElementChanged AXHelp: Year=AXValueDescription: 2012
+ValueChanged AXHelp: Year=AXValueDescription: 0005
+ValueChanged AXHelp: Year=AXValueDescription: 0005
+ValueChanged AXHelp: Year=AXValueDescription: 0005
+ValueChanged AXHelp: Year=AXValueDescription: 0005
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-ax-value-changed-notification.html (0 => 136202)


--- trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-ax-value-changed-notification.html	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-ax-value-changed-notification.html	2012-11-30 05:05:44 UTC (rev 136202)
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+</head>
+<body>
+<input id="test" type="month" value="2012-10">
+<script>
+description('This test checks value changed accessibility notifications.');
+
+var testInput = document.getElementById("test");
+
+if (!window.accessibilityController || !window.eventSender)
+    debug("Please run inside DRT or WRT.");
+else {
+    accessibilityController.addNotificationListener(function (element, notification) {
+        if (notification == 'FocusedUIElementChanged' || notification == 'ValueChanged') {
+            debug(notification + ' ' + element.helpText + '=' + element.valueDescription);
+        }
+    });
+
+    testInput.focus();
+    eventSender.keyDown('\t');
+    eventSender.keyDown('4');
+    eventSender.keyDown('upArrow');
+
+    window.jsTestIsAsync = true;
+
+    window.setTimeout(function() {
+        debug('');
+        testInput.remove();
+        finishJSTest();
+    }, 1);
+}
+</script>
+<script src=""
+</body>
+</html>

Added: trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-blur-and-focus-events-expected.txt (0 => 136202)


--- trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-blur-and-focus-events-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-blur-and-focus-events-expected.txt	2012-11-30 05:05:44 UTC (rev 136202)
@@ -0,0 +1,17 @@
+Check blur and focus events for multiple fields month input UI
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+focus() and blur()
+PASS testInput.focus(); state() is "blur=0 focus=1"
+PASS testInput.blur(); state() is "blur=1 focus=1"
+focus and Tab key to blur
+PASS keyDown("	"); state() is "blur=0 focus=1"
+PASS keyDown("	"); state() is "blur=0 focus=1"
+PASS keyDown("	"); state() is "blur=1 focus=1"
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-blur-and-focus-events.html (0 => 136202)


--- trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-blur-and-focus-events.html	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-blur-and-focus-events.html	2012-11-30 05:05:44 UTC (rev 136202)
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+<body>
+<script src=""
+<script src=""
+<div id="container"></div>
+<script>
+startTestFor('month');
+</script>
+<script src=""
+</body>
+</html>

Added: trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-change-layout-by-value-expected.txt (0 => 136202)


--- trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-change-layout-by-value-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-change-layout-by-value-expected.txt	2012-11-30 05:05:44 UTC (rev 136202)
@@ -0,0 +1,11 @@
+Change multiple fields week input UI layout by value
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS widthOfEmptyValue < widthOfOverflowValue is true
+PASS widthOfEmptyValue is widthOfValidValue
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-change-layout-by-value.html (0 => 136202)


--- trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-change-layout-by-value.html	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-change-layout-by-value.html	2012-11-30 05:05:44 UTC (rev 136202)
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<body>
+<script src=""
+<script>
+description('Change multiple fields week input UI layout by value');
+var testInput = document.createElement('input');
+testInput.type = 'month';
+testInput.max = '9999-12';
+document.body.appendChild(testInput);
+var widthOfEmptyValue = testInput.offsetWidth;
+
+testInput.value = '10000-12';
+var widthOfOverflowValue = testInput.offsetWidth;
+shouldBeTrue('widthOfEmptyValue < widthOfOverflowValue');
+
+testInput.value = '2012-10';
+var widthOfValidValue = testInput.offsetWidth;
+shouldBe('widthOfEmptyValue', 'widthOfValidValue');
+
+testInput.remove();
+</script>
+<script src=""
+</body>
+</html>

Added: trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-mouse-events-expected.txt (0 => 136202)


--- trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-mouse-events-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-mouse-events-expected.txt	2012-11-30 05:05:44 UTC (rev 136202)
@@ -0,0 +1,33 @@
+Multiple fields UI of month input type with mouse events
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Please run this with DRT or WTR.
+
+Test following mouse actions:
+Mouse click to focus each of sub-fields
+Mouse click on the spin button to update each of sub-fields
+
+==> Focus on the month field.
+PASS input.value is "2345-08"
+PASS input.value is "2345-09"
+PASS input.value is "2345-08"
+PASS window.getSelection().rangeCount is 0
+
+==> Focus on the year field.
+PASS input.value is "2346-08"
+PASS input.value is "2347-08"
+PASS input.value is "2346-08"
+PASS window.getSelection().rangeCount is 0
+
+==> Click on a disabled field.
+PASS input.value is "2346-08"
+
+==> Click on a read-only field.
+PASS input.value is "2346-08"
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-mouse-events.html (0 => 136202)


--- trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-mouse-events.html	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-mouse-events.html	2012-11-30 05:05:44 UTC (rev 136202)
@@ -0,0 +1,83 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+</head>
+<body>
+<p id="description"></p>
+<p>
+Please run this with DRT or WTR.
+</p>
+Test following mouse actions:
+<ul>
+    <li>Mouse click to focus each of sub-fields</li>
+    <li>Mouse click on the spin button to update each of sub-fields</li>
+</ul>
+<input id="input" type="month" style="font-family:ahem; font-size:16px;">
+<div id="console"></div>
+<script>
+description('Multiple fields UI of month input type with mouse events');
+var input = document.getElementById('input');
+
+function keyDown(key, modifiers)
+{
+    if (!window.eventSender)
+        return;
+    eventSender.keyDown(key, modifiers);
+}
+
+function mouseClickOn(x, y)
+{
+    if (!window.eventSender)
+        return;
+    eventSender.mouseMoveTo(x + input.offsetLeft, y + input.offsetTop);
+    eventSender.mouseDown();
+    eventSender.mouseUp();
+}
+
+input.value = '2345-07';
+var center = input.offsetHeight / 2;
+var spinButtonOffset = 26;
+
+debug('==> Focus on the month field.');
+mouseClickOn(100, center);
+keyDown('upArrow');
+shouldBeEqualToString('input.value', '2345-08');
+mouseClickOn(input.offsetWidth - spinButtonOffset, center - 1);
+shouldBeEqualToString('input.value', '2345-09');
+mouseClickOn(input.offsetWidth - spinButtonOffset, center + 1);
+shouldBeEqualToString('input.value', '2345-08');
+shouldBeZero('window.getSelection().rangeCount'); // No text selection.
+
+debug('');
+debug('==> Focus on the year field.');
+mouseClickOn(220, center);
+keyDown('upArrow');
+shouldBeEqualToString('input.value', '2346-08');
+mouseClickOn(input.offsetWidth - spinButtonOffset, center - 1);
+shouldBeEqualToString('input.value', '2347-08');
+mouseClickOn(input.offsetWidth - spinButtonOffset, center + 1);
+shouldBeEqualToString('input.value', '2346-08');
+shouldBeZero('window.getSelection().rangeCount'); // No text selection.
+
+debug('');
+debug('==> Click on a disabled field.');
+input.disabled = true;
+mouseClickOn(100, center);
+keyDown('upArrow');
+shouldBeEqualToString('input.value', '2346-08');
+input.disabled = false;
+
+debug('');
+debug('==> Click on a read-only field.');
+input.readOnly = true;
+mouseClickOn(12, center);
+keyDown('upArrow');
+shouldBeEqualToString('input.value', '2346-08');
+input.readOnly = false;
+
+debug('');
+</script>
+<script src=""
+</body>
+</html>

Added: trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-preserve-value-after-history-back-expected.txt (0 => 136202)


--- trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-preserve-value-after-history-back-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-preserve-value-after-history-back-expected.txt	2012-11-30 05:05:44 UTC (rev 136202)
@@ -0,0 +1,18 @@
+Checks input value is preserved after backward and forward
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Went back to a page. Checking a form control which had a full value:
+PASS "12012-10" is "12012-10"
+Went back to a page. Checking a form control which had a partial value:
+PASS "January ----" is "January ----"
+Went forward to a page. Checking a form control which had a full value:
+PASS "0001-11" is "0001-11"
+Went forward to a page. Checking a form control which had a partial value:
+PASS "--------- 1999" is "--------- 1999"
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-preserve-value-after-history-back.html (0 => 136202)


--- trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-preserve-value-after-history-back.html	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-preserve-value-after-history-back.html	2012-11-30 05:05:44 UTC (rev 136202)
@@ -0,0 +1,143 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+</head>
+<body>
+<div id="container">
+<input type="month" id="test1">
+<input type="month" id="test2" min="1999-01" max="1999-12">
+</div>
+<iframe id="iframe"></iframe>
+<script>
+description('Checks input value is preserved after backward and forward');
+if (!window.eventSender)
+    debug('Please run within DRT/WTR');
+window.jsTestIsAsync = true;
+
+var iframe = document.getElementById('iframe');
+var testInput1 = document.getElementById('test1');
+var testInput2 = document.getElementById('test2');
+var state = 'direct';
+var pageName = location.search || '?page0';
+var testCases = [];
+
+function back(newState) {
+    parent.state = newState;
+    history.back();
+}
+
+function failed(message) {
+    testFailed(message + ' in ' + state);
+    finishJSTest();
+}
+
+function fieldsText(input) {
+    if (!window.internals)
+        return "";
+    var editElement = window.internals.oldestShadowRoot(input);
+    return editElement.textContent;
+}
+
+function finishTest() {
+    runTestCases();
+    document.body.removeChild(document.getElementById('container'));
+    finishJSTest();
+}
+
+function forward(newState) {
+    parent.state = newState;
+    history.forward();
+}
+
+function keyDown(key, modifiers) {
+    if (!window.eventSender)
+        return;
+    eventSender.keyDown(key, modifiers);
+}
+
+function runTestCases() {
+    for (var index = 0; index < testCases.length; ++index) {
+        var testCase = testCases[index];
+        debug(testCase['description'] + ':');
+        shouldBeEqualToString('"' + testCase['actual'] + '"', testCase['expected']);
+    }
+    debug('');
+}
+
+window._onload_ = function() {
+    switch (pageName) {
+    case '?page0':
+        iframe.src = "" + '?page1';
+        break;
+
+    case '?page1':
+        switch (parent.state) {
+        case 'direct': {
+            testInput1.value = '12012-10';
+            testInput2.focus();
+            keyDown('upArrow'); // -> [October] 12012
+            var nextUri = location.toString().replace('?page1', '?page2');
+            setTimeout(function () { window.location.href = "" }, 0);
+            break;
+        }
+        case 'backTo1':
+            parent.testCases.push(
+                {
+                    'description' : 'Went back to a page. Checking a form control which had a full value',
+                    'actual' : testInput1.value,
+                    'expected' : '12012-10' },
+                {
+                    'description' : 'Went back to a page. Checking a form control which had a partial value',
+                    'actual' : fieldsText(testInput2),
+                    'expected' : 'January ----'
+                });
+            forward('forwardTo2');
+            break;
+        case 'backTo1Second':
+            parent.finishTest();
+            break;
+        default:
+            failed('Unexpected state(' + parent.state + ')');
+            break;
+        }
+        break;
+
+    case '?page2':
+        switch (parent.state) {
+        case 'direct':
+            testInput1.value = '0001-11';
+            testInput2.focus();
+            keyDown('\t'); //        -> --------- [yyyy]
+            keyDown('downArrow'); // -> --------- [1999]
+            back('backTo1');
+            break;
+        case 'forwardTo2':
+            parent.testCases.push(
+                {
+                    'description' : 'Went forward to a page. Checking a form control which had a full value',
+                    'actual' : testInput1.value,
+                    'expected' : '0001-11'
+                },
+                {
+                    'description' : 'Went forward to a page. Checking a form control which had a partial value',
+                    'actual' : fieldsText(testInput2),
+                    'expected' : '--------- 1999'
+                });
+            back('backTo1Second');
+            break;
+        default:
+            failed('Unexpected state(' + parent.state + ')');
+            break;
+        }
+        break;
+
+    default:
+        failed('Unexpected page(' + pageName + ')');
+        break;
+    }
+};
+</script>
+<script src=""
+</body>
+</html>

Added: trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-reset-value-after-reloads-expected.txt (0 => 136202)


--- trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-reset-value-after-reloads-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-reset-value-after-reloads-expected.txt	2012-11-30 05:05:44 UTC (rev 136202)
@@ -0,0 +1,15 @@
+Checks reloading page resets input values
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Initial values:
+PASS testInput1.value is ""
+PASS testInput2.value is "1234-05"
+Reloaded values:
+PASS testInput1.value is ""
+PASS testInput2.value is "1234-05"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-reset-value-after-reloads.html (0 => 136202)


--- trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-reset-value-after-reloads.html	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-reset-value-after-reloads.html	2012-11-30 05:05:44 UTC (rev 136202)
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+</head>
+<body _onload_="runBodyLoaded()">
+<iframe id=iframe srcdoc="<input type=month id='test1'><input type='month' id='test2' value='1234-05'>"></iframe>
+<script>
+description('Checks reloading page resets input values');
+window.jsTestIsAsync = true;
+
+var iframe = document.getElementById('iframe');
+var testInput1;
+var testInput2;
+
+function runBodyLoaded()
+{
+    testInput1 = iframe.contentDocument.getElementById('test1');
+    testInput2 = iframe.contentDocument.getElementById('test2');
+    debug('Initial values:');
+    shouldBeEqualToString('testInput1.value', '');
+    shouldBeEqualToString('testInput2.value', '1234-05');
+    testInput1.value = '2012-10';
+    testInput2.value = '2012-11';
+    iframe.addEventListener('load', parent.runOnIFrameLoad);
+    iframe.contentWindow.location.reload();
+}
+
+function runOnIFrameLoad()
+{
+    testInput1 = iframe.contentDocument.getElementById('test1');
+    testInput2 = iframe.contentDocument.getElementById('test2');
+    debug('Reloaded values:');
+    shouldBeEqualToString('testInput1.value', '');
+    shouldBeEqualToString('testInput2.value', '1234-05');
+    iframe.parentNode.removeChild(iframe);
+    finishJSTest();
+}
+</script>
+<script src=""
+</body>
+</html>

Added: trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-spinbutton-change-and-input-events-expected.txt (0 => 136202)


--- trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-spinbutton-change-and-input-events-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-spinbutton-change-and-input-events-expected.txt	2012-11-30 05:05:44 UTC (rev 136202)
@@ -0,0 +1,19 @@
+Test for event dispatching by spin buttons in a type=month input.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Initial state
+PASS changeEventCounter is 0
+PASS inputEventCounter is 0
+Click the upper button
+PASS testInput.value is "2012-11"
+PASS changeEventCounter is 1
+PASS inputEventCounter is 1
+Focus on another field
+PASS changeEventCounter is 1
+PASS inputEventCounter is 1
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-spinbutton-change-and-input-events.html (0 => 136202)


--- trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-spinbutton-change-and-input-events.html	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-spinbutton-change-and-input-events.html	2012-11-30 05:05:44 UTC (rev 136202)
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+<script src=""
+<script src=""
+</head>
+<body>
+<script>
+testSpinButtonChangeAndInputEvents('month', '2012-10', '2012-11');
+</script>
+<script src=""
+</body>
+</html>

Added: trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-wheel-event-expected.txt (0 => 136202)


--- trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-wheel-event-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-wheel-event-expected.txt	2012-11-30 05:05:44 UTC (rev 136202)
@@ -0,0 +1,23 @@
+Test for wheel operations for <input type=month>
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Initial value is 1999-01. We'll wheel up by 1:
+PASS input.value is "1999-02"
+Wheel up by 100:
+PASS input.value is "1999-03"
+Wheel down by 1:
+PASS input.value is "1999-02"
+Wheel down by 256:
+PASS input.value is "1999-01"
+Disabled input element:
+PASS input.value is "1999-01"
+Read-only input element:
+PASS input.value is "1999-01"
+No focus:
+PASS input.value is "1999-01"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-wheel-event.html (0 => 136202)


--- trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-wheel-event.html	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-wheel-event.html	2012-11-30 05:05:44 UTC (rev 136202)
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+<script src=""
+</head>
+<body>
+<script>
+testWheelEvent({
+    'inputType' : 'month',
+    'initialValue' : '1999-01',
+    'stepUpValue1' : '1999-02',
+    'stepUpValue2' : '1999-03' });
+</script>
+<script src=""
+</body>
+</html>
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to