Index: chrome/test/data/device_orientation/enable_switch_test.html |
diff --git a/chrome/test/data/device_orientation/enable_switch_test.html b/chrome/test/data/device_orientation/enable_switch_test.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c2f90ac3ad3c28929c91f62c981e48071b5e0770 |
--- /dev/null |
+++ b/chrome/test/data/device_orientation/enable_switch_test.html |
@@ -0,0 +1,32 @@ |
+<html> |
+ <head> |
+ <title>DeviceOrientationEnableSwitchTest</title> |
+ <script type="text/javascript"> |
+ var failed = false; |
+ function pass() { |
+ if (failed) |
+ return; |
+ document.getElementById('status').innerHTML = 'PASS'; |
+ document.location = '#pass'; |
bulach
2010/07/20 14:38:56
nice trick!
|
+ } |
+ function fail() { |
+ document.getElementById('status').innerHTML = 'FAIL'; |
+ document.location = '#fail'; |
+ failed = true; |
+ } |
+ function run() { |
+ for (var property in window) { |
+ if (property == "DeviceOrientationEvent") |
+ fail(); |
+ if (property == "ondeviceorientation") |
+ fail(); |
+ } |
+ |
+ pass(); |
+ } |
+ </script> |
+ </head> |
+ <body onload="run()"> |
+ <div id="status">Running...</div> |
+ </body> |
+</html> |