WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch 6
bug-94196-20120817170532.patch (text/plain), 16.58 KB, created by
yosin
on 2012-08-17 01:06:08 PDT
(
hide
)
Description:
Patch 6
Filename:
MIME Type:
Creator:
yosin
Created:
2012-08-17 01:06:08 PDT
Size:
16.58 KB
patch
obsolete
>Subversion Revision: 125857 >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 63a5277f73bf12bb367bb53f6eba4214998cc709..90668079d586e267c9bf766e422d20659e2fce93 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,27 @@ >+2012-08-17 Yoshifumi Inoue <yosin@chromium.org> >+ >+ [Tests] Adding tests for multiple fields time input UI >+ https://bugs.webkit.org/show_bug.cgi?id=94196 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ This patch introduces functional testing for multiple fields time input >+ UI when both ENABLE_INPUT_TYPE_TIME and ENABLE_INPUT_TYPE_TIME_MULTIPLE_FIELDS >+ are enabled. >+ >+ * fast/forms/time-multiple-fields/time-multiple-fields-change-type-on-focus-expected.txt: Added. >+ * fast/forms/time-multiple-fields/time-multiple-fields-change-type-on-focus.html: Added. >+ * fast/forms/time-multiple-fields/time-multiple-fields-keyboard-events-expected.txt: Added. >+ * fast/forms/time-multiple-fields/time-multiple-fields-keyboard-events.html: Added. >+ * fast/forms/time-multiple-fields/time-multiple-fields-losing-renderer-on-click-expected.txt: Added. >+ * fast/forms/time-multiple-fields/time-multiple-fields-losing-renderer-on-click.html: Added. >+ * fast/forms/time-multiple-fields/time-multiple-fields-spinbutton-change-and-input-events-expected.txt: Added. >+ * fast/forms/time-multiple-fields/time-multiple-fields-spinbutton-change-and-input-events.html: Added. >+ * fast/forms/time-multiple-fields/time-multiple-fields-step-attribute-expected.txt: Added. >+ * fast/forms/time-multiple-fields/time-multiple-fields-step-attribute.html: Added. >+ * fast/forms/time-multiple-fields/time-multiple-fields-stepup-stepdown-from-renderer-expected.txt: Added. >+ * fast/forms/time-multiple-fields/time-multiple-fields-stepup-stepdown-from-renderer.html: Added. >+ > 2012-08-16 Yoshifumi Inoue <yosin@chromium.org> > > [Tests] time-multiple-fields-appearance-basic.html and time-multiple-fields-appearance-pseudo-elements.html are failed on Chromium Windows >diff --git a/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-change-type-on-focus-expected.txt b/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-change-type-on-focus-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..b557868480b0db09e5f8678baabf6d534262df32 >--- /dev/null >+++ b/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-change-type-on-focus-expected.txt >@@ -0,0 +1,12 @@ >+Assertion failure by changing type from type=time in focus event. >+ >+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >+ >+ >+ >+PASS Not crashed. >+PASS mouseDownCount is 1 >+PASS successfullyParsed is true >+ >+TEST COMPLETE >+ >diff --git a/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-change-type-on-focus.html b/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-change-type-on-focus.html >new file mode 100644 >index 0000000000000000000000000000000000000000..b1bd723ff850c424ab7a969871f53d421cf23ed6 >--- /dev/null >+++ b/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-change-type-on-focus.html >@@ -0,0 +1,18 @@ >+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> >+<html> >+<head> >+<script src="../../../fast/js/resources/js-test-pre.js"></script> >+<script src="../resources/common-change-type-on-focus.js"></script> >+</head> >+<body> >+<p id="description"></p> >+ >+<input id=test type=time value="07:00"> >+ >+<div id="console"></div> >+<script> >+testChangeTypeOnFocus(); >+</script> >+<script src="../../../fast/js/resources/js-test-post.js"></script> >+</body> >+</html> >diff --git a/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-keyboard-events-expected.txt b/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-keyboard-events-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..feb904c85bd5238d704abd8d152d153861866179 >--- /dev/null >+++ b/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-keyboard-events-expected.txt >@@ -0,0 +1,34 @@ >+Multiple fields UI of time input type with keyboard events >+ >+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >+ >+ >+Please run this with DumpRenderTree. >+ >+Test following keys: >+Digit keys >+Left/Right - Move focus field inside element >+Up/Down - Increment/decrement value of focus field >+Tab - Move focus field >+Backspace - Make value empty >+ >+== Digit keys == >+PASS input.value is "07:56" >+== Left/Right keys == >+PASS input.value is "06:05" >+PASS document.activeElement.id is "input" >+== Up/Down keys == >+PASS input.value is "05:56" >+PASS input.value is "03:56" >+== Up/Down keys on empty value == >+PASS input.value is "14:58" >+== Tab key == >+PASS input.value is "03:05" >+PASS input.value is "07:05" >+PASS document.activeElement.id is "another" >+== Backspace key == >+PASS input.value is "" >+PASS successfullyParsed is true >+ >+TEST COMPLETE >+ >diff --git a/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-keyboard-events.html b/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-keyboard-events.html >new file mode 100644 >index 0000000000000000000000000000000000000000..6447e8bbdf6d41f64cd522602cb0f9920e0c881b >--- /dev/null >+++ b/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-keyboard-events.html >@@ -0,0 +1,106 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<script src="../../js/resources/js-test-pre.js"></script> >+</head> >+<body> >+<p id="description"></p> >+<p> >+Please run this with DumpRenderTree. >+</p> >+Test following keys: >+<ul> >+ <li>Digit keys</li> >+ <li>Left/Right - Move focus field inside element</li> >+ <li>Up/Down - Increment/decrement value of focus field</li> >+ <li>Tab - Move focus field</li> >+ <li>Backspace - Make value empty</li> >+</ul> >+<input id="input" type="time"> >+<input id="another"> >+<div id="console"></div> >+<script> >+description("Multiple fields UI of time input type with keyboard events"); >+var input = document.getElementById("input"); >+ >+function keyDown(key, modifiers) >+{ >+ if (!window.eventSender) >+ return; >+ eventSender.keyDown(key, modifiers); >+} >+ >+function beginTest(title, value) >+{ >+ debug("== " + title + " =="); >+ input.value = value; >+ input.blur(); >+ input.focus(); >+} >+ >+beginTest('Digit keys'); >+keyDown('7'); >+keyDown('5'); >+keyDown('6'); >+keyDown('A'); >+shouldBeEqualToString('input.value', '07:56'); >+ >+// FIXME: We should test type ahead time out. When event.leapForward() affects >+// keyboard event time stamp, we can uncomment this fragment. >+/* >+beginTest('Digit keys with type ahead timeout'); >+keyDown('1'); >+leapForward(1100); >+keyDown('1'); >+keyDown('5'); >+keyDown('6'); >+keyDown('A'); >+shouldBeEqualToString('input.value', '01:56'); >+*/ >+ >+beginTest('Left/Right keys', '01:24'); >+keyDown('rightArrow'); >+keyDown('5'); >+keyDown('leftArrow'); >+keyDown('6'); >+shouldBeEqualToString('input.value', '06:05'); >+keyDown('leftArrow'); >+keyDown('leftArrow'); >+keyDown('leftArrow'); >+shouldBeEqualToString('document.activeElement.id', 'input'); >+ >+beginTest('Up/Down keys', '04:56'); >+keyDown('upArrow'); >+shouldBeEqualToString('input.value', '05:56'); >+keyDown('downArrow'); >+keyDown('downArrow'); >+shouldBeEqualToString('input.value', '03:56'); >+ >+beginTest('Up/Down keys on empty value', ''); >+keyDown('upArrow'); >+keyDown('upArrow'); >+keyDown('rightArrow'); >+keyDown('downArrow'); >+keyDown('downArrow'); >+keyDown('rightArrow'); >+keyDown('downArrow'); >+shouldBeEqualToString('input.value', '14:58'); >+ >+beginTest('Tab key', '03:00'); >+keyDown('\t'); >+keyDown('5'); >+shouldBeEqualToString('input.value', '03:05'); >+keyDown('\t', ['shiftKey']); >+keyDown('7'); >+shouldBeEqualToString('input.value', '07:05'); >+keyDown('\t'); >+keyDown('\t'); >+shouldBeEqualToString('document.activeElement.id', 'another'); >+ >+beginTest('Backspace key', '12:34'); >+keyDown("\b"); >+shouldBeEqualToString('input.value', ''); >+</script> >+<script src="../../js/resources/js-test-post.js"></script> >+</body> >+</html> >diff --git a/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-losing-renderer-on-click-expected.txt b/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-losing-renderer-on-click-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..9557b7c363a226f9c5eedab8d8c25932d2bfd056 >--- /dev/null >+++ b/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-losing-renderer-on-click-expected.txt >@@ -0,0 +1,2 @@ >+This tests that we don't crash when the renderer goes away during event handling. >+ >diff --git a/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-losing-renderer-on-click.html b/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-losing-renderer-on-click.html >new file mode 100644 >index 0000000000000000000000000000000000000000..8dbd824d3661d6a55d98183dca2430f5b91a979b >--- /dev/null >+++ b/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-losing-renderer-on-click.html >@@ -0,0 +1,12 @@ >+<html> >+ <head> >+ <script src="../resources/common-losing-renderer-on-click.js"></script> >+ <style> >+ #test { width: 100px; } >+ </style> >+ </head> >+ <body onload="testLosingRendererOnClick()"> >+ This tests that we don't crash when the renderer goes away during event handling.<br> >+ <input type="time" id="test" onclick="event.target.style.display='none'"> >+ </body> >+</html> >diff --git a/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-spinbutton-change-and-input-events-expected.txt b/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-spinbutton-change-and-input-events-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..18708091fc8ba90c9d82374064b61f655a2c540f >--- /dev/null >+++ b/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-spinbutton-change-and-input-events-expected.txt >@@ -0,0 +1,19 @@ >+Test for event dispatching by spin buttons in a type=time 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 "04:00" >+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 >+ >diff --git a/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-spinbutton-change-and-input-events.html b/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-spinbutton-change-and-input-events.html >new file mode 100644 >index 0000000000000000000000000000000000000000..c824d2493bd8faad2874578cdad14115717a67c5 >--- /dev/null >+++ b/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-spinbutton-change-and-input-events.html >@@ -0,0 +1,13 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<script src="../../../fast/js/resources/js-test-pre.js"></script> >+<script src="../resources/common-spinbutton-change-and-input-events.js"></script> >+</head> >+<body> >+<script> >+testSpinButtonChangeAndInputEvents('time', '03:00', '04:00'); >+</script> >+<script src="../../../fast/js/resources/js-test-post.js"></script> >+</body> >+</html> >diff --git a/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-step-attribute-expected.txt b/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-step-attribute-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..c9504331eab19a8dfa82705976691d7f3be691c1 >--- /dev/null >+++ b/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-step-attribute-expected.txt >@@ -0,0 +1,14 @@ >+Check step attribute change causes apperance change >+ >+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >+ >+ >+Set step to 0.001 >+PASS widthOfStep001 > widthOfStep60 is true >+Set step to 60 >+PASS widthOfStep60 == widthOfStep60Again is true >+ >+PASS successfullyParsed is true >+ >+TEST COMPLETE >+ >diff --git a/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-step-attribute.html b/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-step-attribute.html >new file mode 100644 >index 0000000000000000000000000000000000000000..c9f0a8ccda6162084a11b5722b6c082a22268822 >--- /dev/null >+++ b/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-step-attribute.html >@@ -0,0 +1,28 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<script src="../../js/resources/js-test-pre.js"></script> >+</head> >+<body> >+<input id=test type=time step=60> >+<script> >+description('Check step attribute change causes apperance change'); >+var testInput = document.getElementById('test'); >+var widthOfStep60 = testInput.offsetWidth; >+ >+debug('Set step to 0.001'); >+testInput.step = 0.001 >+var widthOfStep001 = testInput.offsetWidth; >+shouldBeTrue('widthOfStep001 > widthOfStep60'); >+ >+debug('Set step to 60'); >+testInput.step = 60; >+var widthOfStep60Again = testInput.offsetWidth; >+shouldBeTrue('widthOfStep60 == widthOfStep60Again'); >+ >+debug(''); >+testInput.parentElement.removeChild(testInput); >+</script> >+<script src="../../js/resources/js-test-post.js"></script> >+</body> >+</html> >diff --git a/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-stepup-stepdown-from-renderer-expected.txt b/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-stepup-stepdown-from-renderer-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..f6dbefe6d7d802c2ba213e211eb7e8844a655fcc >--- /dev/null >+++ b/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-stepup-stepdown-from-renderer-expected.txt >@@ -0,0 +1,16 @@ >+Check stepping-up and -down for time input fields from renderer. No cases of empty initial values. >+ >+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >+ >+ >+Function arguments are (value, step, {min or max}, [stepCount]). >+Normal cases >+PASS stepUp("07:13", null, null) is "07:14" >+PASS stepDown("07:13", null, null) is "07:12" >+PASS stepUp("07:13", null, null, 10) is "07:23" >+PASS stepDown("07:13", null, null, 11) is "07:02" >+ >+PASS successfullyParsed is true >+ >+TEST COMPLETE >+ >diff --git a/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-stepup-stepdown-from-renderer.html b/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-stepup-stepdown-from-renderer.html >new file mode 100644 >index 0000000000000000000000000000000000000000..17cebab6f41f98d93113049dc32ea1182e6120a1 >--- /dev/null >+++ b/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-stepup-stepdown-from-renderer.html >@@ -0,0 +1,70 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<script src="../../js/resources/js-test-pre.js"></script> >+</head> >+<body> >+<script> >+description('Check stepping-up and -down for time input fields from renderer. No cases of empty initial values.'); >+ >+var input = document.createElement('input'); >+var invalidStateErr = '"Error: INVALID_STATE_ERR: DOM Exception 11"'; >+ >+document.body.appendChild(input); >+ >+function sendKey(keyName) { >+ var event = document.createEvent('KeyboardEvent'); >+ event.initKeyboardEvent('keydown', true, true, document.defaultView, keyName); >+ input.dispatchEvent(event); >+} >+ >+function setInputAttributes(min, max, step, value) { >+ input.min = min; >+ input.max = max; >+ input.step = step; >+ input.value = value; >+} >+ >+function stepUp(value, step, max, optionalStepCount) { >+ setInputAttributes(null, max, step, value); >+ if (typeof optionalStepCount != "undefined") >+ if (optionalStepCount < 0) >+ for (var i = 0; i < -optionalStepCount; i++) >+ sendKey('Down'); >+ else >+ for (var i = 0; i < optionalStepCount; i++) >+ sendKey('Up'); >+ else >+ sendKey('Up'); >+ return input.value; >+} >+ >+function stepDown(value, step, min, optionalStepCount) { >+ setInputAttributes(min, null, step, value); >+ if (typeof optionalStepCount != "undefined") >+ if (optionalStepCount < 0) >+ for (var i = 0; i < -optionalStepCount; i++) >+ sendKey('Up'); >+ else >+ for (var i = 0; i < optionalStepCount; i++) >+ sendKey('Down'); >+ else >+ sendKey('Down'); >+ return input.value; >+} >+ >+input.type = 'time'; >+input.focus(); >+sendKey('Right'); >+debug('Function arguments are (value, step, {min or max}, [stepCount]).'); >+debug('Normal cases'); >+shouldBe('stepUp("07:13", null, null)', '"07:14"'); >+shouldBe('stepDown("07:13", null, null)', '"07:12"'); >+shouldBe('stepUp("07:13", null, null, 10)', '"07:23"'); >+shouldBe('stepDown("07:13", null, null, 11)', '"07:02"'); >+debug(''); >+document.body.removeChild(input); >+</script> >+<script src="../../js/resources/js-test-post.js"></script> >+</body> >+</html>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 94196
:
158735
|
158758
|
158760
|
158761
|
158968
|
158989
| 159036