Modified: trunk/LayoutTests/ChangeLog (204003 => 204004)
--- trunk/LayoutTests/ChangeLog 2016-08-02 00:27:03 UTC (rev 204003)
+++ trunk/LayoutTests/ChangeLog 2016-08-02 00:31:26 UTC (rev 204004)
@@ -1,3 +1,19 @@
+2016-08-01 Chris Dumez <[email protected]>
+
+ [iOS] Fix fast/events/touch/document-create-touch-list-ios.html
+ https://bugs.webkit.org/show_bug.cgi?id=160429
+
+ Reviewed by Ryosuke Niwa.
+
+ Fix several bugs in fast/events/touch/document-create-touch-list-ios.html:
+ 1. Use proper parameters to TouchEvent.initTouchEvent() so that it no longer throws.
+ 2. For the check testing passing bad parameters to createTouchList(), print PASS
+ if it throws instead of FAIL since this is the expected behavior.
+
+ * fast/events/touch/document-create-touch-list-ios-expected.txt:
+ * fast/events/touch/script-tests/document-create-touch-list-ios.js:
+ (catch): Deleted.
+
2016-08-01 Alexey Proskuryakov <[email protected]>
Sierra test expectations gardening for editing/input/password-echo-textnode.html.
Modified: trunk/LayoutTests/fast/events/touch/document-create-touch-list-ios-expected.txt (204003 => 204004)
--- trunk/LayoutTests/fast/events/touch/document-create-touch-list-ios-expected.txt 2016-08-02 00:27:03 UTC (rev 204003)
+++ trunk/LayoutTests/fast/events/touch/document-create-touch-list-ios-expected.txt 2016-08-02 00:31:26 UTC (rev 204004)
@@ -11,8 +11,12 @@
PASS touchList.length is 0
PASS touchList.item(0) is null
PASS touchList.item(1) is null
-FAIL An exception was thrown: The provided value is non-finite
-FAIL An exception was thrown: Argument 1 ('touches') to Document.createTouchList must be an instance of Touch
+PASS ts.touches.length is 2
+PASS ts.touches[0].identifier is 12341
+PASS ts.touches[0].clientX is 60
+PASS ts.touches[1].screenY is 120
+PASS ts.ctrlKey is true
+PASS var tl = document.createTouchList(1, 2) threw exception TypeError: Argument 1 ('touches') to Document.createTouchList must be an instance of Touch.
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/fast/events/touch/script-tests/document-create-touch-list-ios.js (204003 => 204004)
--- trunk/LayoutTests/fast/events/touch/script-tests/document-create-touch-list-ios.js 2016-08-02 00:27:03 UTC (rev 204003)
+++ trunk/LayoutTests/fast/events/touch/script-tests/document-create-touch-list-ios.js 2016-08-02 00:31:26 UTC (rev 204004)
@@ -21,7 +21,7 @@
var tl = document.createTouchList(t, t2);
var evt = document.createEvent("TouchEvent");
- evt.initTouchEvent(tl, tl, tl, "touchstart", window, 0, 0, 0, 0, true, false, false, false);
+ evt.initTouchEvent("touchstart", false, false, window, 0, 0, 0, 0, 0, true, false, false, false, tl, tl, tl, 1, 0);
document.body.addEventListener("touchstart", function handleTouchStart(ev) {
ts = ev;
@@ -38,11 +38,7 @@
}
// Test createTouchList with invalid arguments which throws exceptions.
-try {
- var tl = document.createTouchList(1, 2);
-} catch(e) {
- testFailed("An exception was thrown: " + e.message);
-}
+shouldThrow("var tl = document.createTouchList(1, 2)");
successfullyParsed = true;
isSuccessfullyParsed();