Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/Orientation/script-tests/create-event-orientationchange.js

Issue 2217763003: Remove Blink-WebKit-only document.createEvent strings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 description('Tests that document.createEvent() works with orientationChange if e nabled')
2
3 function handleTestResult()
4 {
5 document.getElementById('result').innerHTML = "PASS";
6 }
7
8 if (window.internals && internals.runtimeFlags.orientationEventEnabled) {
9 window.addEventListener('orientationchange', handleTestResult, false);
10
11 try {
12 var event = document.createEvent("OrientationEvent");
13 event.initEvent("orientationchange", false, false);
14 window.dispatchEvent(event);
15 } catch(e) {
16 document.getElementById('result').innerHTML = "FAIL... orientationChange event doesn't appear to be enabled or implemented.";
17 }
18 } else {
19 handleTestResult();
20 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698