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

Unified Diff: third_party/WebKit/LayoutTests/svg/css/glyph-orientation-rounding-test.xhtml

Issue 1419583002: Remove SVG glyph-orientation-horizontal and glyph-orientation-vertical (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove glyph-orientation-rounding-test Created 5 years, 2 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: third_party/WebKit/LayoutTests/svg/css/glyph-orientation-rounding-test.xhtml
diff --git a/third_party/WebKit/LayoutTests/svg/css/glyph-orientation-rounding-test.xhtml b/third_party/WebKit/LayoutTests/svg/css/glyph-orientation-rounding-test.xhtml
deleted file mode 100644
index 92939a06b5f1c2f02f6d9771aa754c8a5f1cfb6c..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/svg/css/glyph-orientation-rounding-test.xhtml
+++ /dev/null
@@ -1,124 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<script src="../../resources/js-test.js"/>
-</head>
-<body>
-<svg display="none" xmlns="http://www.w3.org/2000/svg"><text id="text"/></svg>
-<p id="description"></p>
-<div id="console"/>
-<script>
-var textElement = document.getElementById("text");
-var computedStyle;
-
-function parseGlyphOrientationHelper(property, angleValue, expectedValue)
-{
- textElement.setAttributeNS(null, property, angleValue);
- computedStyle = textElement.ownerDocument.defaultView.getComputedStyle(textElement);
-
- debug("Test angleValue: '" + angleValue + "'");
-
- if (expectedValue == "auto") {
- shouldBe("computedStyle.getPropertyValue('" + property + "')", '"auto"');
- } else {
- shouldBe("parseFloat(computedStyle.getPropertyValue('" + property + "'))", "" + expectedValue);
- }
-
- debug("");
-}
-
-function parseGlyphOrientation(angleValue, expectedValue)
-{
- if (expectedValue == undefined) {
- parseGlyphOrientationHelper("glyph-orientation-horizontal", angleValue, 0.0);
- parseGlyphOrientationHelper("glyph-orientation-vertical", angleValue, "auto");
- } else {
- parseGlyphOrientationHelper("glyph-orientation-horizontal", angleValue, expectedValue);
- parseGlyphOrientationHelper("glyph-orientation-vertical", angleValue, expectedValue);
- }
-}
-
-description('Stress test glyph-orientation SVG CSS properties');
-debug('');
-
-debug('Strings that fail to parse, and hence parse as "0" for horziontal and "auto" as vertical.');
-debug('');
-
-parseGlyphOrientation(" 0,1");
-parseGlyphOrientation(" 0,00000.1");
-parseGlyphOrientation(" 0 1");
-parseGlyphOrientation("0.1 0.2");
-
-parseGlyphOrientation(" 270,1");
-parseGlyphOrientation(" 270,00000.1");
-parseGlyphOrientation(" 270 1");
-parseGlyphOrientation("270.1 0.2");
-
-
-debug('This tests the rounding of glyph orientation values to the only allowed values 0, 90, 180, 270.');
-debug('');
-
-parseGlyphOrientation("-0.0", 0.0);
-parseGlyphOrientation("-10.0", 0.0);
-parseGlyphOrientation("-45.0", 0.0);
-parseGlyphOrientation("0.0", 0.0);
-parseGlyphOrientation("10.0", 0.0);
-parseGlyphOrientation("45.0", 0.0);
-
-parseGlyphOrientation("-90.0", 90.0);
-parseGlyphOrientation("-100.0", 90.0);
-parseGlyphOrientation("-135.0", 90.0);
-parseGlyphOrientation("90.0", 90.0);
-parseGlyphOrientation("100.0", 90.0);
-parseGlyphOrientation("135.0", 90.0);
-
-parseGlyphOrientation("-180.0", 180.0);
-parseGlyphOrientation("-190.0", 180.0);
-parseGlyphOrientation("-225.0", 180.0);
-parseGlyphOrientation("180.0", 180.0);
-parseGlyphOrientation("190.0", 180.0);
-parseGlyphOrientation("225.0", 180.0);
-
-parseGlyphOrientation("-270.0", 270.0);
-parseGlyphOrientation("-280.0", 270.0);
-parseGlyphOrientation("-305.0", 270.0);
-parseGlyphOrientation("270.0", 270.0);
-parseGlyphOrientation("280.0", 270.0);
-parseGlyphOrientation("305.0", 270.0);
-
-debug('Tests angles bigger than 360.');
-debug('');
-
-parseGlyphOrientation("449.0", 90.0);
-parseGlyphOrientation("450.0", 90.0);
-parseGlyphOrientation("451.0", 90.0);
-
-parseGlyphOrientation("539.0", 180.0);
-parseGlyphOrientation("540.0", 180.0);
-parseGlyphOrientation("541.0", 180.0);
-
-parseGlyphOrientation("629.0", 270.0);
-parseGlyphOrientation("630.0", 270.0);
-parseGlyphOrientation("631.0", 270.0);
-
-debug('Tests whitespace before/after angle value.');
-debug('');
-
-parseGlyphOrientation(" .0 ", 0.0);
-parseGlyphOrientation(" 0 ", 0.0);
-parseGlyphOrientation(" 90.0 ", 90.0);
-parseGlyphOrientation(" 180.0 ", 180.0);
-parseGlyphOrientation(" 270.0 ", 270.0);
-
-debug('Tests rounding of fractional angle values.');
-debug('');
-
-parseGlyphOrientation("45.0000", 0.0);
-parseGlyphOrientation("45.0001", 90.0);
-parseGlyphOrientation("135.000", 90.0);
-parseGlyphOrientation("135.001", 180.0);
-
-
-</script>
-
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698