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

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

Issue 10831023: Move over a bunch of tests from browser_tests to content_browsertests. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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/chrome_tests.gypi ('k') | chrome/test/data/fileapi/common.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/device_orientation/device_orientation_test.html
===================================================================
--- chrome/test/data/device_orientation/device_orientation_test.html (revision 148472)
+++ chrome/test/data/device_orientation/device_orientation_test.html (working copy)
@@ -1,36 +0,0 @@
-<html>
- <head>
- <title>DeviceOrientation test</title>
- <script type="text/javascript">
- var eventCount = 0;
-
- function checkOrientationEvent(event) {
- // Return true iff the orientation is close enough to (1, 2, 3).
- return Math.abs(event.alpha - 1) < 0.01 &&
- Math.abs(event.beta - 2) < 0.01 &&
- Math.abs(event.gamma - 3) < 0.01;
- }
-
- function onOrientation(event) {
- if (checkOrientationEvent(event)) {
- window.removeEventListener('deviceorientation', onOrientation);
- pass();
- } else {
- fail();
- }
- }
-
- function pass() {
- document.getElementById('status').innerHTML = 'PASS';
- document.location = '#pass';
- }
-
- function fail() {
- document.location = '#fail';
- }
- </script>
- </head>
- <body onLoad="window.addEventListener('deviceorientation', onOrientation)">
- <div id="status">FAIL</div>
- </body>
-</html>
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/test/data/fileapi/common.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698