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