Bug 962285 - Make DeviceLightEvent.value unrestricted double; r=smaug

This commit is contained in:
Ehsan Akhgari 2014-01-21 18:19:14 -05:00
parent c6eb5d18d8
commit fce78efee8
2 changed files with 7 additions and 1 deletions

View File

@ -510,6 +510,12 @@ ok(!e.isTrusted, "Event should not be trusted");
is(e.value, 1, "value should be 1");
document.dispatchEvent(e);
is(receivedEvent, e, "Wrong event!");
e = new DeviceLightEvent("hello", {value: Infinity} );
is(e.value, Infinity, "value should be positive infinity");
e = new DeviceLightEvent("hello", {value: -Infinity} );
is(e.value, -Infinity, "value should be negative infinity");
e = new DeviceLightEvent("hello");
is(e.value, Infinity, "Uninitialized value should be positive infinity");
// DeviceOrientationEvent
e = new DeviceOrientationEvent("hello");

View File

@ -7,7 +7,7 @@
[Constructor(DOMString type, optional DeviceLightEventInit eventInitDict)]
interface DeviceLightEvent : Event
{
readonly attribute double value;
readonly attribute unrestricted double value;
};
dictionary DeviceLightEventInit : EventInit