summaryrefslogtreecommitdiffstats
path: root/LayoutTests/fast/dom/DeviceOrientation/script-tests/create-event.js
blob: 706de70f8ccafad596da3e826922a0b3cff0885b (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;