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

Unified Diff: LayoutTests/css3/device-adapt/viewport-user-style.html

Issue 1058723002: Remove testRunner.injectStyleSheet usage from layout tests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 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/css3/device-adapt/viewport-user-style.html
diff --git a/LayoutTests/css3/device-adapt/viewport-user-style.html b/LayoutTests/css3/device-adapt/viewport-user-style.html
deleted file mode 100644
index f00869ec357e92650041dadb576239fc8547e7b9..0000000000000000000000000000000000000000
--- a/LayoutTests/css3/device-adapt/viewport-user-style.html
+++ /dev/null
@@ -1,53 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>User stylesheet containing an @viewport rule</title>
- <script src="../../resources/testharness.js"></script>
- <script src="../../resources/testharnessreport.js"></script>
- <style>
- html, body { width: 100%; height: 100%; margin: 0 }
-
- @viewport {
- height: 2000px;
- }
- </style>
- <script>
- test(function(){
- assert_own_property(window, "testRunner");
- }, "Check that window.testRunner is present. Required to add a user stylesheet.");
-
- if (window.testRunner) {
- testRunner.injectStyleSheet("@viewport { width: 450px; height: auto; zoom: auto; min-zoom: auto; max-zoom: auto }", true);
- }
- </script>
-</head>
-<body>
- <div id="log"></div>
- <script>
- test(function(){
- assert_own_property(window, "internals");
- }, "Check that window.internals is present. Required to call viewportAsText.");
-
- var actualWidth;
- var actualHeight;
-
- document.body.offsetHeight;
-
- var vpString = internals.viewportAsText(document, 1, 320, 352);
- var match = /viewport size (.+)x(.+) scale (.+ )/.exec(vpString);
-
- if (match) {
- actualWidth = parseFloat(match[1]);
- actualHeight = parseFloat(match[2]);
- }
-
- test(function(){
- assert_equals(actualWidth, 450);
- }, "Check that we get the viewport width from the user stylesheet.");
-
- test(function(){
- assert_equals(actualHeight, 2000);
- }, "Check that we get the viewport height from the author stylesheet.");
- </script>
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698