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

Side by Side Diff: LayoutTests/fast/dom/DeviceOrientation/script-tests/no-synchronous-events.js

Issue 22599005: Blink-side layout tests for the new Device Orientation API. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebased once more Created 7 years, 2 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
1 description('Tests that events are never fired synchronously from a call to wind ow.addEventListener().'); 1 description('Tests that events are never fired synchronously from a call to wind ow.addEventListener().');
2 2
3 if (window.testRunner) 3 if (window.testRunner)
4 testRunner.setMockDeviceOrientation(true, 1.1, true, 2.2, true, 3.3); 4 testRunner.setMockDeviceOrientation(true, 1.1, true, 2.2, true, 3.3, true, t rue);
5 else 5 else
6 debug('This test can not be run without the TestRunner'); 6 debug('This test can not be run without the TestRunner');
7 7
8 var hasAddEventListenerReturned = false; 8 var hasAddEventListenerReturned = false;
9 window.addEventListener('deviceorientation', function() { 9 window.addEventListener('deviceorientation', function() {
10 shouldBeTrue('hasAddEventListenerReturned'); 10 shouldBeTrue('hasAddEventListenerReturned');
11 finishJSTest(); 11 finishJSTest();
12 }); 12 });
13 hasAddEventListenerReturned = true; 13 hasAddEventListenerReturned = true;
14 14
15 window.jsTestIsAsync = true; 15 window.jsTestIsAsync = true;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698