Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Unified Diff: LayoutTests/fast/events/constructors/mouse-event-constructor.html

Issue 1165693005: Change MouseEvent.button to be 'short' instead of 'unsigned short' (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removed m_buttonDown Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/events/constructors/mouse-event-constructor-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/events/constructors/mouse-event-constructor.html
diff --git a/LayoutTests/fast/events/constructors/mouse-event-constructor.html b/LayoutTests/fast/events/constructors/mouse-event-constructor.html
index 1aa56fe84c391248b16f7823fb1d29386e7d3272..710e328b4af21d3221683d0061602f194988d43f 100644
--- a/LayoutTests/fast/events/constructors/mouse-event-constructor.html
+++ b/LayoutTests/fast/events/constructors/mouse-event-constructor.html
@@ -103,17 +103,18 @@ var MIN_CLIENT_SIZE = "-33554432";
});
// button is passed.
-// Numbers within the unsigned short range.
+// Numbers within the short range.
shouldBe("new MouseEvent('eventType', { button: 0 }).button", "0");
shouldBe("new MouseEvent('eventType', { button: 1 }).button", "1");
-shouldBe("new MouseEvent('eventType', { button: 65534 }).button", "65534");
+shouldBe("new MouseEvent('eventType', { button: 65534 }).button", "-2");
philipj_slow 2015/06/10 13:54:46 Oh, I guess you should actually move this to the "
ramya.v 2015/06/11 05:02:13 Done.
+shouldBe("new MouseEvent('eventType', { button: -2 }).button", "-2");
-// Numbers that are equal to ((unsigned short)-1) should be treated as 0.
+// Numbers that are equal to -1 should be treated as 0.
shouldBe("new MouseEvent('eventType', { button: 65535 }).button", "0");
shouldBe("new MouseEvent('eventType', { button: 9007199254740991 }).button", "0");
shouldBe("new MouseEvent('eventType', { button: -1 }).button", "0");
-// Numbers out of the unsigned short range.
+// Numbers out of the short range.
// 2^{64}-1
shouldBe("new MouseEvent('eventType', { button: 18446744073709551615 }).button", "0");
shouldBe("new MouseEvent('eventType', { button: 12345678901234567890 }).button", "2048");
@@ -135,12 +136,12 @@ shouldBe("new MouseEvent('eventType', { button: {moemoe: 12345} }).button", "0")
shouldBe("new MouseEvent('eventType', { button: {valueOf: function () { return 12345; }} }).button", "12345");
// buttons is passed.
-// Numbers within the unsigned short range.
+// Numbers within the short range.
philipj_slow 2015/06/10 13:54:46 Oops, buttons is still unsigned short, change this
ramya.v 2015/06/11 05:02:14 Done.
shouldBe("new MouseEvent('eventType', { buttons: 0 }).buttons", "0");
shouldBe("new MouseEvent('eventType', { buttons: 1 }).buttons", "1");
shouldBe("new MouseEvent('eventType', { buttons: 65534 }).buttons", "65534");
-// Numbers out of the unsigned short range.
+// Numbers out of the short range.
// 2^{64}-1
shouldBe("new MouseEvent('eventType', { buttons: 65535 }).buttons", "65535");
shouldBe("new MouseEvent('eventType', { buttons: 9007199254740991 }).buttons", "65535");
« no previous file with comments | « no previous file | LayoutTests/fast/events/constructors/mouse-event-constructor-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698