Title: [231549] trunk/LayoutTests
Revision
231549
Author
[email protected]
Date
2018-05-09 00:35:20 -0700 (Wed, 09 May 2018)

Log Message

Update fast/events/constructors/(mouse|wheel)-event-constructor.html and expectations.
https://bugs.webkit.org/show_bug.cgi?id=115025

Reviewed by Michael Catanzaro.

clientX/Y values are clamped to a signed 26 bit-integer by using LayoutPoint.
I updated the test to expect that. (Alternatively, we could keep the
current expectations in the test and leave FAIL lines in the test
expectation file.)

Expectation files are updated or removed to match the test change, as
well as a number of code changes since the last time they were accurate.

* fast/events/constructors/mouse-event-constructor-expected.txt:
* fast/events/constructors/mouse-event-constructor.html:
* fast/events/constructors/wheel-event-constructor-expected.txt:
* fast/events/constructors/wheel-event-constructor.html:
* platform/gtk/TestExpectations:
* platform/gtk/fast/events/constructors/mouse-event-constructor-expected.txt: Removed.
* platform/gtk/fast/events/constructors/wheel-event-constructor-expected.txt: Removed.
* platform/mac/fast/events/constructors/mouse-event-constructor-expected.txt: Removed.
* platform/mac/fast/events/constructors/wheel-event-constructor-expected.txt: Removed.
* platform/wpe/TestExpectations:

Modified Paths

Removed Paths

  • trunk/LayoutTests/platform/gtk/fast/events/constructors/
  • trunk/LayoutTests/platform/mac/fast/events/constructors/

Diff

Modified: trunk/LayoutTests/ChangeLog (231548 => 231549)


--- trunk/LayoutTests/ChangeLog	2018-05-09 07:05:46 UTC (rev 231548)
+++ trunk/LayoutTests/ChangeLog	2018-05-09 07:35:20 UTC (rev 231549)
@@ -1,3 +1,29 @@
+2018-05-09  Ms2ger  <[email protected]>
+
+        Update fast/events/constructors/(mouse|wheel)-event-constructor.html and expectations.
+        https://bugs.webkit.org/show_bug.cgi?id=115025
+
+        Reviewed by Michael Catanzaro.
+
+        clientX/Y values are clamped to a signed 26 bit-integer by using LayoutPoint.
+        I updated the test to expect that. (Alternatively, we could keep the
+        current expectations in the test and leave FAIL lines in the test
+        expectation file.)
+
+        Expectation files are updated or removed to match the test change, as
+        well as a number of code changes since the last time they were accurate.
+
+        * fast/events/constructors/mouse-event-constructor-expected.txt:
+        * fast/events/constructors/mouse-event-constructor.html:
+        * fast/events/constructors/wheel-event-constructor-expected.txt:
+        * fast/events/constructors/wheel-event-constructor.html:
+        * platform/gtk/TestExpectations:
+        * platform/gtk/fast/events/constructors/mouse-event-constructor-expected.txt: Removed.
+        * platform/gtk/fast/events/constructors/wheel-event-constructor-expected.txt: Removed.
+        * platform/mac/fast/events/constructors/mouse-event-constructor-expected.txt: Removed.
+        * platform/mac/fast/events/constructors/wheel-event-constructor-expected.txt: Removed.
+        * platform/wpe/TestExpectations:
+
 2018-05-08  Daniel Bates  <[email protected]>
 
         Do not apply X-Frame-Options and CSP frame-ancestors to Quick Look-applicable responses in NetworkProcess

Modified: trunk/LayoutTests/fast/events/constructors/mouse-event-constructor-expected.txt (231548 => 231549)


--- trunk/LayoutTests/fast/events/constructors/mouse-event-constructor-expected.txt	2018-05-09 07:05:46 UTC (rev 231548)
+++ trunk/LayoutTests/fast/events/constructors/mouse-event-constructor-expected.txt	2018-05-09 07:35:20 UTC (rev 231549)
@@ -23,23 +23,23 @@
 PASS new MouseEvent('eventType', { cancelable: true }).cancelable is true
 PASS new MouseEvent('eventType', { view: window }).view is window
 PASS new MouseEvent('eventType', { view: this }).view is this
-PASS new MouseEvent('eventType', { view: testObject }).view is null
-PASS new MouseEvent('eventType', { view: document }).view is null
+PASS new MouseEvent('eventType', { view: testObject }).view threw exception TypeError: Type error.
+PASS new MouseEvent('eventType', { view: document }).view threw exception TypeError: Type error.
 PASS new MouseEvent('eventType', { view: undefined }).view is null
 PASS new MouseEvent('eventType', { view: null }).view is null
-PASS new MouseEvent('eventType', { view: false }).view is null
-PASS new MouseEvent('eventType', { view: true }).view is null
-PASS new MouseEvent('eventType', { view: '' }).view is null
-PASS new MouseEvent('eventType', { view: 'chocolate' }).view is null
-PASS new MouseEvent('eventType', { view: 12345 }).view is null
-PASS new MouseEvent('eventType', { view: 18446744073709551615 }).view is null
-PASS new MouseEvent('eventType', { view: NaN }).view is null
-PASS new MouseEvent('eventType', { view: {valueOf: function () { return window; } } }).view == window is false
-PASS new MouseEvent('eventType', { get view() { return 123; } }).view is null
+PASS new MouseEvent('eventType', { view: false }).view threw exception TypeError: Type error.
+PASS new MouseEvent('eventType', { view: true }).view threw exception TypeError: Type error.
+PASS new MouseEvent('eventType', { view: '' }).view threw exception TypeError: Type error.
+PASS new MouseEvent('eventType', { view: 'chocolate' }).view threw exception TypeError: Type error.
+PASS new MouseEvent('eventType', { view: 12345 }).view threw exception TypeError: Type error.
+PASS new MouseEvent('eventType', { view: 18446744073709551615 }).view threw exception TypeError: Type error.
+PASS new MouseEvent('eventType', { view: NaN }).view threw exception TypeError: Type error.
+PASS new MouseEvent('eventType', { view: {valueOf: function () { return window; } } }).view threw exception TypeError: Type error.
+PASS new MouseEvent('eventType', { get view() { return 123; } }).view threw exception TypeError: Type error.
 PASS new MouseEvent('eventType', { get view() { throw 'MouseEvent Error'; } }) threw exception MouseEvent Error.
 PASS new MouseEvent('eventType', { detail: 0 }).detail is 0
+PASS new MouseEvent('eventType', { detail: -1 }).detail is -1
 PASS new MouseEvent('eventType', { detail: 2147483647 }).detail is 2147483647
-PASS new MouseEvent('eventType', { detail: -1 }).detail is -1
 PASS new MouseEvent('eventType', { detail: -2147483648 }).detail is -2147483648
 PASS new MouseEvent('eventType', { detail: 4294967295 }).detail is -1
 PASS new MouseEvent('eventType', { detail: 9007199254740991 }).detail is -1
@@ -59,8 +59,8 @@
 PASS new MouseEvent('eventType', { detail: {moemoe: 12345} }).detail is 0
 PASS new MouseEvent('eventType', { detail: {valueOf: function () { return 12345; }} }).detail is 12345
 PASS new MouseEvent('eventType', { screenX: 0 }).screenX is 0
+PASS new MouseEvent('eventType', { screenX: -1 }).screenX is -1
 PASS new MouseEvent('eventType', { screenX: 2147483647 }).screenX is 2147483647
-PASS new MouseEvent('eventType', { screenX: -1 }).screenX is -1
 PASS new MouseEvent('eventType', { screenX: -2147483648 }).screenX is -2147483648
 PASS new MouseEvent('eventType', { screenX: 4294967295 }).screenX is -1
 PASS new MouseEvent('eventType', { screenX: 9007199254740991 }).screenX is -1
@@ -80,8 +80,8 @@
 PASS new MouseEvent('eventType', { screenX: {moemoe: 12345} }).screenX is 0
 PASS new MouseEvent('eventType', { screenX: {valueOf: function () { return 12345; }} }).screenX is 12345
 PASS new MouseEvent('eventType', { screenY: 0 }).screenY is 0
+PASS new MouseEvent('eventType', { screenY: -1 }).screenY is -1
 PASS new MouseEvent('eventType', { screenY: 2147483647 }).screenY is 2147483647
-PASS new MouseEvent('eventType', { screenY: -1 }).screenY is -1
 PASS new MouseEvent('eventType', { screenY: -2147483648 }).screenY is -2147483648
 PASS new MouseEvent('eventType', { screenY: 4294967295 }).screenY is -1
 PASS new MouseEvent('eventType', { screenY: 9007199254740991 }).screenY is -1
@@ -101,9 +101,9 @@
 PASS new MouseEvent('eventType', { screenY: {moemoe: 12345} }).screenY is 0
 PASS new MouseEvent('eventType', { screenY: {valueOf: function () { return 12345; }} }).screenY is 12345
 PASS new MouseEvent('eventType', { clientX: 0 }).clientX is 0
-FAIL new MouseEvent('eventType', { clientX: 2147483647 }).clientX should be 2147483647. Was -1.
 PASS new MouseEvent('eventType', { clientX: -1 }).clientX is -1
-FAIL new MouseEvent('eventType', { clientX: -2147483648 }).clientX should be -2147483648. Was 0.
+PASS new MouseEvent('eventType', { clientX: 2147483647 }).clientX is 33554431
+PASS new MouseEvent('eventType', { clientX: -2147483648 }).clientX is -33554432
 PASS new MouseEvent('eventType', { clientX: 4294967295 }).clientX is -1
 PASS new MouseEvent('eventType', { clientX: 9007199254740991 }).clientX is -1
 PASS new MouseEvent('eventType', { clientX: 18446744073709551615 }).clientX is 0
@@ -122,9 +122,9 @@
 PASS new MouseEvent('eventType', { clientX: {moemoe: 12345} }).clientX is 0
 PASS new MouseEvent('eventType', { clientX: {valueOf: function () { return 12345; }} }).clientX is 12345
 PASS new MouseEvent('eventType', { clientY: 0 }).clientY is 0
-FAIL new MouseEvent('eventType', { clientY: 2147483647 }).clientY should be 2147483647. Was -1.
 PASS new MouseEvent('eventType', { clientY: -1 }).clientY is -1
-FAIL new MouseEvent('eventType', { clientY: -2147483648 }).clientY should be -2147483648. Was 0.
+PASS new MouseEvent('eventType', { clientY: 2147483647 }).clientY is 33554431
+PASS new MouseEvent('eventType', { clientY: -2147483648 }).clientY is -33554432
 PASS new MouseEvent('eventType', { clientY: 4294967295 }).clientY is -1
 PASS new MouseEvent('eventType', { clientY: 9007199254740991 }).clientY is -1
 PASS new MouseEvent('eventType', { clientY: 18446744073709551615 }).clientY is 0
@@ -176,18 +176,18 @@
 PASS new MouseEvent('eventType', { relatedTarget: document }).relatedTarget is document
 PASS new MouseEvent('eventType', { relatedTarget: xhr }).relatedTarget is xhr
 PASS new MouseEvent('eventType', { relatedTarget: window }).relatedTarget is window
-PASS new MouseEvent('eventType', { relatedTarget: testObject }).relatedTarget is null
+PASS new MouseEvent('eventType', { relatedTarget: testObject }) threw exception TypeError: Type error.
 PASS new MouseEvent('eventType', { relatedTarget: undefined }).relatedTarget is null
 PASS new MouseEvent('eventType', { relatedTarget: null }).relatedTarget is null
-PASS new MouseEvent('eventType', { relatedTarget: false }).relatedTarget is null
-PASS new MouseEvent('eventType', { relatedTarget: true }).relatedTarget is null
-PASS new MouseEvent('eventType', { relatedTarget: '' }).relatedTarget is null
-PASS new MouseEvent('eventType', { relatedTarget: 'chocolate' }).relatedTarget is null
-PASS new MouseEvent('eventType', { relatedTarget: 12345 }).relatedTarget is null
-PASS new MouseEvent('eventType', { relatedTarget: 18446744073709551615 }).relatedTarget is null
-PASS new MouseEvent('eventType', { relatedTarget: NaN }).relatedTarget is null
-PASS new MouseEvent('eventType', { relatedTarget: {valueOf: function () { return testDiv; } } }).relatedTarget == testDiv is false
-PASS new MouseEvent('eventType', { get relatedTarget() { return 123; } }).relatedTarget is null
+PASS new MouseEvent('eventType', { relatedTarget: false }) threw exception TypeError: Type error.
+PASS new MouseEvent('eventType', { relatedTarget: true }) threw exception TypeError: Type error.
+PASS new MouseEvent('eventType', { relatedTarget: '' }) threw exception TypeError: Type error.
+PASS new MouseEvent('eventType', { relatedTarget: 'chocolate' }) threw exception TypeError: Type error.
+PASS new MouseEvent('eventType', { relatedTarget: 12345 }) threw exception TypeError: Type error.
+PASS new MouseEvent('eventType', { relatedTarget: 18446744073709551615 }) threw exception TypeError: Type error.
+PASS new MouseEvent('eventType', { relatedTarget: NaN }) threw exception TypeError: Type error.
+PASS new MouseEvent('eventType', { relatedTarget: {valueOf: function () { return testDiv; } } }) threw exception TypeError: Type error.
+PASS new MouseEvent('eventType', { get relatedTarget() { return 123; } }) threw exception TypeError: Type error.
 PASS new MouseEvent('eventType', { get relatedTarget() { throw 'MouseEvent Error'; } }) threw exception MouseEvent Error.
 PASS new MouseEvent('eventType', { bubbles: true, cancelable: true, view: window, detail: 111, screenX: 222, screenY: 333, clientX: 444, clientY: 555, ctrlKey: true, shiftKey: true, altKey: true, metaKey: true, button: 666, relatedTarget: testDiv }).bubbles is true
 PASS new MouseEvent('eventType', { bubbles: true, cancelable: true, view: window, detail: 111, screenX: 222, screenY: 333, clientX: 444, clientY: 555, ctrlKey: true, shiftKey: true, altKey: true, metaKey: true, button: 666, relatedTarget: testDiv }).cancelable is true

Modified: trunk/LayoutTests/fast/events/constructors/mouse-event-constructor.html (231548 => 231549)


--- trunk/LayoutTests/fast/events/constructors/mouse-event-constructor.html	2018-05-09 07:05:46 UTC (rev 231548)
+++ trunk/LayoutTests/fast/events/constructors/mouse-event-constructor.html	2018-05-09 07:35:20 UTC (rev 231549)
@@ -62,10 +62,13 @@
 ["detail", "screenX", "screenY", "clientX", "clientY"].forEach(function (attr) {
     // numbers within the long range.
     shouldBe("new MouseEvent('eventType', { " + attr + ": 0 })." + attr, "0");
-    shouldBe("new MouseEvent('eventType', { " + attr + ": 2147483647 })." + attr, "2147483647");
     shouldBe("new MouseEvent('eventType', { " + attr + ": -1 })." + attr, "-1");
-    shouldBe("new MouseEvent('eventType', { " + attr + ": -2147483648 })." + attr, "-2147483648");
 
+    // numbers within the long range, but outside the range of LayoutUnit.
+    var exponent = attr.startsWith("client") ? 25 : 31;
+    shouldBe("new MouseEvent('eventType', { " + attr + ": 2147483647 })." + attr, String(Math.pow(2, exponent) - 1));
+    shouldBe("new MouseEvent('eventType', { " + attr + ": -2147483648 })." + attr, String(-Math.pow(2, exponent)));
+
     // numbers out of the long range.
     shouldBe("new MouseEvent('eventType', { " + attr + ": 4294967295 })." + attr, "-1");
     // 2^{53}-1, the largest number that can be exactly represented by double.

Modified: trunk/LayoutTests/fast/events/constructors/wheel-event-constructor-expected.txt (231548 => 231549)


--- trunk/LayoutTests/fast/events/constructors/wheel-event-constructor-expected.txt	2018-05-09 07:05:46 UTC (rev 231548)
+++ trunk/LayoutTests/fast/events/constructors/wheel-event-constructor-expected.txt	2018-05-09 07:35:20 UTC (rev 231549)
@@ -26,23 +26,23 @@
 PASS new WheelEvent('eventType', { cancelable: true }).cancelable is true
 PASS new WheelEvent('eventType', { view: window }).view is window
 PASS new WheelEvent('eventType', { view: this }).view is this
-PASS new WheelEvent('eventType', { view: testObject }).view is null
-PASS new WheelEvent('eventType', { view: document }).view is null
+PASS new WheelEvent('eventType', { view: testObject }).view threw exception TypeError: Type error.
+PASS new WheelEvent('eventType', { view: document }).view threw exception TypeError: Type error.
 PASS new WheelEvent('eventType', { view: undefined }).view is null
 PASS new WheelEvent('eventType', { view: null }).view is null
-PASS new WheelEvent('eventType', { view: false }).view is null
-PASS new WheelEvent('eventType', { view: true }).view is null
-PASS new WheelEvent('eventType', { view: '' }).view is null
-PASS new WheelEvent('eventType', { view: 'chocolate' }).view is null
-PASS new WheelEvent('eventType', { view: 12345 }).view is null
-PASS new WheelEvent('eventType', { view: 18446744073709551615 }).view is null
-PASS new WheelEvent('eventType', { view: NaN }).view is null
-PASS new WheelEvent('eventType', { view: {valueOf: function () { return window; } } }).view == window is false
-PASS new WheelEvent('eventType', { get view() { return 123; } }).view is null
+PASS new WheelEvent('eventType', { view: false }).view threw exception TypeError: Type error.
+PASS new WheelEvent('eventType', { view: true }).view threw exception TypeError: Type error.
+PASS new WheelEvent('eventType', { view: '' }).view threw exception TypeError: Type error.
+PASS new WheelEvent('eventType', { view: 'chocolate' }).view threw exception TypeError: Type error.
+PASS new WheelEvent('eventType', { view: 12345 }).view threw exception TypeError: Type error.
+PASS new WheelEvent('eventType', { view: 18446744073709551615 }).view threw exception TypeError: Type error.
+PASS new WheelEvent('eventType', { view: NaN }).view threw exception TypeError: Type error.
+PASS new WheelEvent('eventType', { view: {valueOf: function () { return window; } } }).view threw exception TypeError: Type error.
+PASS new WheelEvent('eventType', { get view() { return 123; } }).view threw exception TypeError: Type error.
 PASS new WheelEvent('eventType', { get view() { throw 'WheelEvent Error'; } }) threw exception WheelEvent Error.
 PASS new WheelEvent('eventType', { detail: 0 }).detail is 0
+PASS new WheelEvent('eventType', { detail: -1 }).detail is -1
 PASS new WheelEvent('eventType', { detail: 2147483647 }).detail is 2147483647
-PASS new WheelEvent('eventType', { detail: -1 }).detail is -1
 PASS new WheelEvent('eventType', { detail: -2147483648 }).detail is -2147483648
 PASS new WheelEvent('eventType', { detail: 4294967295 }).detail is -1
 PASS new WheelEvent('eventType', { detail: 9007199254740991 }).detail is -1
@@ -62,8 +62,8 @@
 PASS new WheelEvent('eventType', { detail: {moemoe: 12345} }).detail is 0
 PASS new WheelEvent('eventType', { detail: {valueOf: function () { return 12345; }} }).detail is 12345
 PASS new WheelEvent('eventType', { screenX: 0 }).screenX is 0
+PASS new WheelEvent('eventType', { screenX: -1 }).screenX is -1
 PASS new WheelEvent('eventType', { screenX: 2147483647 }).screenX is 2147483647
-PASS new WheelEvent('eventType', { screenX: -1 }).screenX is -1
 PASS new WheelEvent('eventType', { screenX: -2147483648 }).screenX is -2147483648
 PASS new WheelEvent('eventType', { screenX: 4294967295 }).screenX is -1
 PASS new WheelEvent('eventType', { screenX: 9007199254740991 }).screenX is -1
@@ -83,8 +83,8 @@
 PASS new WheelEvent('eventType', { screenX: {moemoe: 12345} }).screenX is 0
 PASS new WheelEvent('eventType', { screenX: {valueOf: function () { return 12345; }} }).screenX is 12345
 PASS new WheelEvent('eventType', { screenY: 0 }).screenY is 0
+PASS new WheelEvent('eventType', { screenY: -1 }).screenY is -1
 PASS new WheelEvent('eventType', { screenY: 2147483647 }).screenY is 2147483647
-PASS new WheelEvent('eventType', { screenY: -1 }).screenY is -1
 PASS new WheelEvent('eventType', { screenY: -2147483648 }).screenY is -2147483648
 PASS new WheelEvent('eventType', { screenY: 4294967295 }).screenY is -1
 PASS new WheelEvent('eventType', { screenY: 9007199254740991 }).screenY is -1
@@ -104,9 +104,9 @@
 PASS new WheelEvent('eventType', { screenY: {moemoe: 12345} }).screenY is 0
 PASS new WheelEvent('eventType', { screenY: {valueOf: function () { return 12345; }} }).screenY is 12345
 PASS new WheelEvent('eventType', { clientX: 0 }).clientX is 0
-FAIL new WheelEvent('eventType', { clientX: 2147483647 }).clientX should be 2147483647. Was -1.
 PASS new WheelEvent('eventType', { clientX: -1 }).clientX is -1
-FAIL new WheelEvent('eventType', { clientX: -2147483648 }).clientX should be -2147483648. Was 0.
+PASS new WheelEvent('eventType', { clientX: 2147483647 }).clientX is 33554431
+PASS new WheelEvent('eventType', { clientX: -2147483648 }).clientX is -33554432
 PASS new WheelEvent('eventType', { clientX: 4294967295 }).clientX is -1
 PASS new WheelEvent('eventType', { clientX: 9007199254740991 }).clientX is -1
 PASS new WheelEvent('eventType', { clientX: 18446744073709551615 }).clientX is 0
@@ -125,9 +125,9 @@
 PASS new WheelEvent('eventType', { clientX: {moemoe: 12345} }).clientX is 0
 PASS new WheelEvent('eventType', { clientX: {valueOf: function () { return 12345; }} }).clientX is 12345
 PASS new WheelEvent('eventType', { clientY: 0 }).clientY is 0
-FAIL new WheelEvent('eventType', { clientY: 2147483647 }).clientY should be 2147483647. Was -1.
 PASS new WheelEvent('eventType', { clientY: -1 }).clientY is -1
-FAIL new WheelEvent('eventType', { clientY: -2147483648 }).clientY should be -2147483648. Was 0.
+PASS new WheelEvent('eventType', { clientY: 2147483647 }).clientY is 33554431
+PASS new WheelEvent('eventType', { clientY: -2147483648 }).clientY is -33554432
 PASS new WheelEvent('eventType', { clientY: 4294967295 }).clientY is -1
 PASS new WheelEvent('eventType', { clientY: 9007199254740991 }).clientY is -1
 PASS new WheelEvent('eventType', { clientY: 18446744073709551615 }).clientY is 0
@@ -146,8 +146,8 @@
 PASS new WheelEvent('eventType', { clientY: {moemoe: 12345} }).clientY is 0
 PASS new WheelEvent('eventType', { clientY: {valueOf: function () { return 12345; }} }).clientY is 12345
 PASS new WheelEvent('eventType', { wheelDeltaX: 0 }).wheelDeltaX is 0
+PASS new WheelEvent('eventType', { wheelDeltaX: -1 }).wheelDeltaX is -1
 PASS new WheelEvent('eventType', { wheelDeltaX: 2147483647 }).wheelDeltaX is 2147483647
-PASS new WheelEvent('eventType', { wheelDeltaX: -1 }).wheelDeltaX is -1
 PASS new WheelEvent('eventType', { wheelDeltaX: -2147483648 }).wheelDeltaX is -2147483648
 PASS new WheelEvent('eventType', { wheelDeltaX: 4294967295 }).wheelDeltaX is -1
 PASS new WheelEvent('eventType', { wheelDeltaX: 9007199254740991 }).wheelDeltaX is -1
@@ -167,8 +167,8 @@
 PASS new WheelEvent('eventType', { wheelDeltaX: {moemoe: 12345} }).wheelDeltaX is 0
 PASS new WheelEvent('eventType', { wheelDeltaX: {valueOf: function () { return 12345; }} }).wheelDeltaX is 12345
 PASS new WheelEvent('eventType', { wheelDeltaY: 0 }).wheelDeltaY is 0
+PASS new WheelEvent('eventType', { wheelDeltaY: -1 }).wheelDeltaY is -1
 PASS new WheelEvent('eventType', { wheelDeltaY: 2147483647 }).wheelDeltaY is 2147483647
-PASS new WheelEvent('eventType', { wheelDeltaY: -1 }).wheelDeltaY is -1
 PASS new WheelEvent('eventType', { wheelDeltaY: -2147483648 }).wheelDeltaY is -2147483648
 PASS new WheelEvent('eventType', { wheelDeltaY: 4294967295 }).wheelDeltaY is -1
 PASS new WheelEvent('eventType', { wheelDeltaY: 9007199254740991 }).wheelDeltaY is -1
@@ -245,18 +245,18 @@
 PASS new WheelEvent('eventType', { relatedTarget: testDiv }).relatedTarget is testDiv
 PASS new WheelEvent('eventType', { relatedTarget: document }).relatedTarget is document
 PASS new WheelEvent('eventType', { relatedTarget: xhr }).relatedTarget is xhr
-PASS new WheelEvent('eventType', { relatedTarget: testObject }).relatedTarget is null
+PASS new WheelEvent('eventType', { relatedTarget: testObject }) threw exception TypeError: Type error.
 PASS new WheelEvent('eventType', { relatedTarget: undefined }).relatedTarget is null
 PASS new WheelEvent('eventType', { relatedTarget: null }).relatedTarget is null
-PASS new WheelEvent('eventType', { relatedTarget: false }).relatedTarget is null
-PASS new WheelEvent('eventType', { relatedTarget: true }).relatedTarget is null
-PASS new WheelEvent('eventType', { relatedTarget: '' }).relatedTarget is null
-PASS new WheelEvent('eventType', { relatedTarget: 'chocolate' }).relatedTarget is null
-PASS new WheelEvent('eventType', { relatedTarget: 12345 }).relatedTarget is null
-PASS new WheelEvent('eventType', { relatedTarget: 18446744073709551615 }).relatedTarget is null
-PASS new WheelEvent('eventType', { relatedTarget: NaN }).relatedTarget is null
-PASS new WheelEvent('eventType', { relatedTarget: {valueOf: function () { return testDiv; } } }).relatedTarget == testDiv is false
-PASS new WheelEvent('eventType', { get relatedTarget() { return 123; } }).relatedTarget is null
+PASS new WheelEvent('eventType', { relatedTarget: false }) threw exception TypeError: Type error.
+PASS new WheelEvent('eventType', { relatedTarget: true }) threw exception TypeError: Type error.
+PASS new WheelEvent('eventType', { relatedTarget: '' }) threw exception TypeError: Type error.
+PASS new WheelEvent('eventType', { relatedTarget: 'chocolate' }) threw exception TypeError: Type error.
+PASS new WheelEvent('eventType', { relatedTarget: 12345 }) threw exception TypeError: Type error.
+PASS new WheelEvent('eventType', { relatedTarget: 18446744073709551615 }) threw exception TypeError: Type error.
+PASS new WheelEvent('eventType', { relatedTarget: NaN }) threw exception TypeError: Type error.
+PASS new WheelEvent('eventType', { relatedTarget: {valueOf: function () { return testDiv; } } }) threw exception TypeError: Type error.
+PASS new WheelEvent('eventType', { get relatedTarget() { return 123; } }).relatedTarget threw exception TypeError: Type error.
 PASS new WheelEvent('eventType', { get relatedTarget() { throw 'WheelEvent Error'; } }) threw exception WheelEvent Error.
 PASS new WheelEvent('eventType', { bubbles: true, cancelable: true, view: window, detail: 111, screenX: 222, screenY: 333, clientX: 444, clientY: 555, ctrlKey: true, shiftKey: true, altKey: true, metaKey: true, button: 666, relatedTarget: testDiv, wheelDeltaX: 777, wheelDeltaY: 888, deltaMode: WheelEvent.DOM_DELTA_PAGE }).bubbles is true
 PASS new WheelEvent('eventType', { bubbles: true, cancelable: true, view: window, detail: 111, screenX: 222, screenY: 333, clientX: 444, clientY: 555, ctrlKey: true, shiftKey: true, altKey: true, metaKey: true, button: 666, relatedTarget: testDiv, wheelDeltaX: 777, wheelDeltaY: 888, deltaMode: WheelEvent.DOM_DELTA_PAGE }).cancelable is true

Modified: trunk/LayoutTests/fast/events/constructors/wheel-event-constructor.html (231548 => 231549)


--- trunk/LayoutTests/fast/events/constructors/wheel-event-constructor.html	2018-05-09 07:05:46 UTC (rev 231548)
+++ trunk/LayoutTests/fast/events/constructors/wheel-event-constructor.html	2018-05-09 07:35:20 UTC (rev 231549)
@@ -65,10 +65,13 @@
 ["detail", "screenX", "screenY", "clientX", "clientY", "wheelDeltaX", "wheelDeltaY"].forEach(function (attr) {
     // numbers within the long range.
     shouldBe("new WheelEvent('eventType', { " + attr + ": 0 })." + attr, "0");
-    shouldBe("new WheelEvent('eventType', { " + attr + ": 2147483647 })." + attr, "2147483647");
     shouldBe("new WheelEvent('eventType', { " + attr + ": -1 })." + attr, "-1");
-    shouldBe("new WheelEvent('eventType', { " + attr + ": -2147483648 })." + attr, "-2147483648");
 
+    // numbers within the long range, but outside the range of LayoutUnit.
+    var exponent = attr.startsWith("client") ? 25 : 31;
+    shouldBe("new WheelEvent('eventType', { " + attr + ": 2147483647 })." + attr, String(Math.pow(2, exponent) - 1));
+    shouldBe("new WheelEvent('eventType', { " + attr + ": -2147483648 })." + attr, String(-Math.pow(2, exponent)));
+
     // numbers out of the long range.
     shouldBe("new WheelEvent('eventType', { " + attr + ": 4294967295 })." + attr, "-1");
     // 2^{53}-1, the largest number that can be exactly represented by double.

Modified: trunk/LayoutTests/platform/gtk/TestExpectations (231548 => 231549)


--- trunk/LayoutTests/platform/gtk/TestExpectations	2018-05-09 07:05:46 UTC (rev 231548)
+++ trunk/LayoutTests/platform/gtk/TestExpectations	2018-05-09 07:35:20 UTC (rev 231549)
@@ -2686,9 +2686,6 @@
 
 webkit.org/b/99893 svg/animations/mozilla/animateMotion-mpath-targetChange-1.svg [ ImageOnlyFailure Pass ]
 
-webkit.org/b/115025 fast/events/constructors/mouse-event-constructor.html [ Failure ]
-webkit.org/b/115025 fast/events/constructors/wheel-event-constructor.html [ Failure ]
-
 webkit.org/b/115437 fast/text/complex-initial-advance.html [ ImageOnlyFailure ]
 
 webkit.org/b/117582 fast/flexbox/clear-overflow-before-scroll-update.html [ Failure ]

Modified: trunk/LayoutTests/platform/wpe/TestExpectations (231548 => 231549)


--- trunk/LayoutTests/platform/wpe/TestExpectations	2018-05-09 07:05:46 UTC (rev 231548)
+++ trunk/LayoutTests/platform/wpe/TestExpectations	2018-05-09 07:35:20 UTC (rev 231549)
@@ -631,9 +631,7 @@
 webkit.org/b/173419 fast/events/click-focus-control.html [ Failure ]
 webkit.org/b/173419 fast/events/click-range-slider.html [ Failure ]
 webkit.org/b/173419 fast/events/constructors/media-stream-event-constructor.html [ Failure ]
-webkit.org/b/173419 fast/events/constructors/mouse-event-constructor.html [ Failure ]
 webkit.org/b/173419 fast/events/constructors/overconstrained-error-event-constructor.html [ Failure ]
-webkit.org/b/173419 fast/events/constructors/wheel-event-constructor.html [ Failure ]
 webkit.org/b/173419 fast/events/content-changed-during-drop.html [ Failure ]
 webkit.org/b/173419 fast/events/context-activated-by-key-event.html [ Failure ]
 webkit.org/b/173419 fast/events/continuous-platform-wheelevent-in-scrolling-div.html [ Failure ]
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to