summaryrefslogtreecommitdiffstats
path: root/LayoutTests/fast/dom/DeviceOrientation/script-tests/create-event.js
blob: 0fe87743498263bbde2d5196d4be10d7198f3a69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
description("Tests that document.createEvent() works with DeviceOrientationEvent.");

var event = document.createEvent('DeviceOrientationEvent');

shouldBeTrue("typeof event == 'object'");

shouldBeTrue("'type' in event");
shouldBeTrue("'bubbles' in event");
shouldBeTrue("'cancelable' in event");
shouldBeTrue("'alpha' in event");
shouldBeTrue("'beta' in event");
shouldBeTrue("'gamma' in event");

shouldBeTrue("typeof event.type == 'string'");
shouldBeTrue("typeof event.bubbles == 'boolean'");
shouldBeTrue("typeof event.cancelable == 'boolean'");
shouldBeTrue("typeof event.alpha == 'object'");
shouldBeTrue("typeof event.beta == 'object'");
shouldBeTrue("typeof event.gamma == 'object'");

window.successfullyParsed = true;