diff options
author | hans@chromium.org <hans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-22 09:55:33 +0000 |
---|---|---|
committer | hans@chromium.org <hans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-22 09:55:33 +0000 |
commit | 66249e26a883eb057e1e9283ca22e3b825fd3e11 (patch) | |
tree | 73da02e17244967922d185e2515541a284a44be2 /chrome/test/data | |
parent | 2a83e76e21d8d9f62c318a0fff9f7ec73fa3c300 (diff) | |
download | chromium_src-66249e26a883eb057e1e9283ca22e3b825fd3e11.zip chromium_src-66249e26a883eb057e1e9283ca22e3b825fd3e11.tar.gz chromium_src-66249e26a883eb057e1e9283ca22e3b825fd3e11.tar.bz2 |
Add --enable-device-orientation switch and set ENABLE_DEVICE_ORIENTATION=1
Flip the compile-time enable switch for device orientation to on,
and add a command-line switch to put the functionality behind.
The command-line flag will be used both on the Chromium side,
and in WebKit via WebRuntimeFeatures.
BUG=44654
TEST=browser_tests --gtest_filter=DeviceOrientationEnableSwitchTest.*
Review URL: http://codereview.chromium.org/3042009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53317 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/data')
-rw-r--r-- | chrome/test/data/device_orientation/enable_switch_test.html | 32 |
1 files changed, 32 insertions, 0 deletions
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 0000000..c2f90ac --- /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'; + } + 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> |