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

Unified Diff: chrome/test/data/device_orientation/enable_switch_test.html

Issue 3042009: Add --enable-device-orientation switch and set ENABLE_DEVICE_ORIENTATION=1 (Closed)
Patch Set: Created 10 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/render_thread.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « chrome/renderer/render_thread.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698