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

Side by Side Diff: LayoutTests/fast/dom/DeviceLight/script-tests/window-property.js

Issue 143823004: Implement DeviceLight (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Event not Oilpan-ed yet. Add a test back Created 6 years, 9 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 the window.DeviceLightEvent and window.ondevicelight pro perties are present.");
2
3 function hasDeviceLightEventProperty()
4 {
5 for (var property in window) {
6 if (property == "DeviceLightEvent")
7 return true;
8 }
9 return false;
10 }
11
12 shouldBeTrue("typeof window.DeviceLightEvent == 'object'");
13 shouldBeFalse("typeof window.DeviceLightEvent == 'function'");
14 shouldBeTrue("hasDeviceLightEventProperty()");
15 shouldBeTrue("'DeviceLightEvent' in window");
16 shouldBeTrue("window.hasOwnProperty('DeviceLightEvent')");
17
18 function hasOnDeviceLightProperty()
19 {
20 for (var property in window) {
21 if (property == "ondevicelight")
22 return true;
23 }
24 }
25
26 shouldBeTrue("typeof window.ondevicelight == 'object'");
27 shouldBeTrue("hasOnDeviceLightProperty()");
28 shouldBeTrue("'ondevicelight' in window");
29 shouldBeTrue("window.hasOwnProperty('ondevicelight')");
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698