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

Unified Diff: LayoutTests/inspector/screen-orientation-override.html

Issue 1220643002: Revert of [DevTools] Implement screen orientation override. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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
Index: LayoutTests/inspector/screen-orientation-override.html
diff --git a/LayoutTests/inspector/screen-orientation-override.html b/LayoutTests/inspector/screen-orientation-override.html
deleted file mode 100644
index 2ca4fc4bf0b60949aaa891195e6f7e6c5ce456dc..0000000000000000000000000000000000000000
--- a/LayoutTests/inspector/screen-orientation-override.html
+++ /dev/null
@@ -1,113 +0,0 @@
-<html>
-<head>
-<script src="../http/tests/inspector/inspector-test.js"></script>
-<script>
-
-if (!window.testRunner)
- debug("This test requires testRunner");
-
-function dump()
-{
- return "angle: " + screen.orientation.angle + "; type: " + screen.orientation.type;
-}
-
-function setup()
-{
- if (window.testRunner)
- testRunner.setMockScreenOrientation("landscape-primary");
- return dump();
-}
-
-function test()
-{
- function testOverride(angle, orientation, next)
- {
- if (orientation) {
- InspectorTest.ScreenOrientationAgent.setScreenOrientationOverride(angle, orientation, protocolCallback);
- } else {
- InspectorTest.ScreenOrientationAgent.clearScreenOrientationOverride(protocolCallback);
- }
-
- function protocolCallback()
- {
- InspectorTest.evaluateInPage("dump()", dumpCallback);
- }
-
- function dumpCallback(result)
- {
- InspectorTest.addResult(result.value);
- next();
- }
- }
-
- function testError(angle, orientation, next)
- {
- InspectorTest.ScreenOrientationAgent.setScreenOrientationOverride(angle, orientation, protocolCallback);
-
- function protocolCallback(error)
- {
- InspectorTest.addResult(error);
- next();
- }
- }
-
- InspectorTest.runTestSuite([
- function setUp(next)
- {
- InspectorTest.evaluateInPage("setup()", callback);
-
- function callback(result)
- {
- InspectorTest.addResult(result.value);
- next();
- }
- },
-
- function setWrongAngle1(next)
- {
- testError(-1, "portraitPrimary", next);
- },
-
- function setWrongAngle2(next)
- {
- testError(360, "portraitPrimary", next);
- },
-
- function setWrongType(next)
- {
- testError(120, "wrongType", next);
- },
-
- function setPortraitPrimary(next)
- {
- testOverride(0, "portraitPrimary", next);
- },
-
- function setPortraitSecondary(next)
- {
- testOverride(180, "portraitSecondary", next);
- },
-
- function setLandscapePrimary(next)
- {
- testOverride(90, "landscapePrimary", next);
- },
-
- function setLandscapeSecondary(next)
- {
- testOverride(270, "landscapeSecondary", next);
- },
-
- function clearOverride(next)
- {
- testOverride(0, "", next);
- }
- ]);
-}
-</script>
-</head>
-<body onload="runTest()">
-<p>
-</p>
-</body>
-</html>
« no previous file with comments | « LayoutTests/http/tests/inspector/inspector-test.js ('k') | LayoutTests/inspector/screen-orientation-override-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698