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

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

Issue 14447006: Global constructors should be configurable and not enumerable (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Clean rebase on master Created 7 years, 8 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
« no previous file with comments | « no previous file | LayoutTests/fast/dom/DeviceOrientation/window-property-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 description('Tests that the window.DeviceOrientationEvent and window.ondeviceori entation properties are present.'); 1 description('Tests that the window.DeviceOrientationEvent and window.ondeviceori entation properties are present.');
2 2
3 function hasDeviceOrientationEventProperty()
4 {
5 for (var property in window) {
6 if (property == 'DeviceOrientationEvent')
7 return true;
8 }
9 return false;
10 }
11
12 shouldBeTrue("typeof window.DeviceOrientationEvent == 'object'"); 3 shouldBeTrue("typeof window.DeviceOrientationEvent == 'object'");
13 shouldBeFalse("typeof window.DeviceOrientationEvent == 'function'"); 4 shouldBeFalse("typeof window.DeviceOrientationEvent == 'function'");
14 shouldBeTrue("hasDeviceOrientationEventProperty()"); 5 shouldBeFalse("window.propertyIsEnumerable('DeviceOrientationEvent')");
15 shouldBeTrue("'DeviceOrientationEvent' in window"); 6 shouldBeTrue("'DeviceOrientationEvent' in window");
16 shouldBeTrue("window.hasOwnProperty('DeviceOrientationEvent')"); 7 shouldBeTrue("window.hasOwnProperty('DeviceOrientationEvent')");
17 8
18 function hasOnDeviceOrientationProperty() 9 function hasOnDeviceOrientationProperty()
19 { 10 {
20 for (var property in window) { 11 for (var property in window) {
21 if (property == 'ondeviceorientation') 12 if (property == 'ondeviceorientation')
22 return true; 13 return true;
23 } 14 }
24 return false; 15 return false;
25 } 16 }
26 17
27 shouldBeTrue("typeof window.ondeviceorientation == 'object'"); 18 shouldBeTrue("typeof window.ondeviceorientation == 'object'");
28 shouldBeTrue("hasOnDeviceOrientationProperty()"); 19 shouldBeTrue("hasOnDeviceOrientationProperty()");
29 shouldBeTrue("'ondeviceorientation' in window"); 20 shouldBeTrue("'ondeviceorientation' in window");
30 shouldBeTrue("window.hasOwnProperty('ondeviceorientation')"); 21 shouldBeTrue("window.hasOwnProperty('ondeviceorientation')");
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/DeviceOrientation/window-property-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698