1 description("Tests that document.createEvent() works with DeviceMotinEvent."); 2 3 var event = document.createEvent('DeviceMotionEvent'); 4 5 shouldBeTrue("typeof event == 'object'"); 6 7 shouldBeTrue("'type' in event"); 8 shouldBeTrue("'bubbles' in event"); 9 shouldBeTrue("'cancelable' in event"); 10 shouldBeTrue("'acceleration' in event"); 11 shouldBeTrue("'accelerationIncludingGravity' in event"); 12 shouldBeTrue("'rotationRate' in event"); 13 shouldBeTrue("'interval' in event"); 14 15 shouldBeTrue("typeof event.type == 'string'"); 16 shouldBeTrue("typeof event.bubbles == 'boolean'"); 17 shouldBeTrue("typeof event.cancelable == 'boolean'"); 18 shouldBeTrue("typeof event.acceleration == 'object'"); 19 shouldBeTrue("typeof event.accelerationIncludingGravity == 'object'"); 20 shouldBeTrue("typeof event.rotationRate == 'object'"); 21 shouldBeTrue("typeof event.interval == 'object'"); 22 23 window.successfullyParsed = true; 24