diff options
Diffstat (limited to 'LayoutTests/fast/dom/DeviceOrientation/script-tests/create-event.js')
-rw-r--r-- | LayoutTests/fast/dom/DeviceOrientation/script-tests/create-event.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/LayoutTests/fast/dom/DeviceOrientation/script-tests/create-event.js b/LayoutTests/fast/dom/DeviceOrientation/script-tests/create-event.js new file mode 100644 index 0000000..0fe8774 --- /dev/null +++ b/LayoutTests/fast/dom/DeviceOrientation/script-tests/create-event.js @@ -0,0 +1,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; |