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

Unified Diff: third_party/WebKit/LayoutTests/svg/dom/SVGAnimatedAngle.html

Issue 2705293005: Convert LayoutTests/svg/dom/SVGAnimated*.html js-tests.js to testharness.js based tests. (Closed)
Patch Set: Align with review comments Created 3 years, 10 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 | « no previous file | third_party/WebKit/LayoutTests/svg/dom/SVGAnimatedAngle-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/svg/dom/SVGAnimatedAngle.html
diff --git a/third_party/WebKit/LayoutTests/svg/dom/SVGAnimatedAngle.html b/third_party/WebKit/LayoutTests/svg/dom/SVGAnimatedAngle.html
index 04e91f3d2b5648a16e2918018609122bb055e45d..9ff380fd84571dd2af5460964c1cc54855b25590 100644
--- a/third_party/WebKit/LayoutTests/svg/dom/SVGAnimatedAngle.html
+++ b/third_party/WebKit/LayoutTests/svg/dom/SVGAnimatedAngle.html
@@ -1,11 +1,33 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../resources/js-test.js"></script>
-</head>
-<body>
-<p id="description"></p>
-<div id="console"></div>
-<script src="script-tests/SVGAnimatedAngle.js"></script>
-</body>
-</html>
+<!DOCTYPE HTML>
+<title>SVGAnimatedAngle interface - utilizing the orientAngle property of SVGMarkerElement</title>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script>
+test(function() {
+ // This test checks the SVGAnimatedAngle API - utilizing the orientAngle property of SVGMarkerElement.
+
+ var markerElement = document.createElementNS("http://www.w3.org/2000/svg", "marker");
+
+ // Check initial orientAngle value.
+ assert_true(markerElement.orientAngle instanceof SVGAnimatedAngle);
+ assert_true(markerElement.orientAngle.baseVal instanceof SVGAngle);
+ assert_equals(markerElement.orientAngle.baseVal.value, 0);
+
+ // Check that angles are dynamic, caching value in a local variable and modifying it, should take effect.
+ var numRef = markerElement.orientAngle.baseVal;
+ numRef.value = 100;
+ assert_equals(numRef.value, 100);
+ assert_equals(markerElement.orientAngle.baseVal.value, 100);
+
+ // Check that assigning to baseVal has no effect, as no setter is defined.
+ markerElement.orientAngle.baseVal = -1;
+ assert_equals(markerElement.orientAngle.baseVal.value, 100);
+ markerElement.orientAngle.baseVal = 'aString';
+ assert_equals(markerElement.orientAngle.baseVal.value, 100);
+ markerElement.orientAngle.baseVal = markerElement;
+ assert_equals(markerElement.orientAngle.baseVal.value, 100);
+
+ // Check that the orientAngle baseVal type has not been changed.
+ assert_true(markerElement.orientAngle.baseVal instanceof SVGAngle);
+});
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/svg/dom/SVGAnimatedAngle-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698