1 description('Tests that document.createEvent() works with orientationChange if enabled')
3 function handleTestResult()
5 document
.getElementById('result').innerHTML
= "PASS";
8 if (window
.internals
&& internals
.runtimeFlags
.orientationEventEnabled
) {
9 window
.addEventListener('orientationchange', handleTestResult
, false);
12 var event
= document
.createEvent("OrientationEvent");
13 event
.initEvent("orientationchange", false, false);
14 window
.dispatchEvent(event
);
16 document
.getElementById('result').innerHTML
= "FAIL... orientationChange event doesn't appear to be enabled or implemented.";