| Index: third_party/WebKit/LayoutTests/svg/dom/SVGAnimatedLength.html
|
| diff --git a/third_party/WebKit/LayoutTests/svg/dom/SVGAnimatedLength.html b/third_party/WebKit/LayoutTests/svg/dom/SVGAnimatedLength.html
|
| index 54ae2e9bbde8b6e2c671203b5f9e7b7ba5cb07d7..f5388a874cd4b4cffc5b355256a67840d02a813f 100644
|
| --- a/third_party/WebKit/LayoutTests/svg/dom/SVGAnimatedLength.html
|
| +++ b/third_party/WebKit/LayoutTests/svg/dom/SVGAnimatedLength.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/SVGAnimatedLength.js"></script>
|
| -</body>
|
| -</html>
|
| +<!DOCTYPE HTML>
|
| +<title>SVGAnimatedLength interface - utilizing the width property of SVGRectElement</title>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| +<script>
|
| +test(function() {
|
| + // This test checks the SVGAnimatedLength API - utilizing the width property of SVGRectElement.
|
| +
|
| + var rectElement = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
| +
|
| + // Check initial width value.
|
| + assert_true(rectElement.width instanceof SVGAnimatedLength);
|
| + assert_true(rectElement.width.baseVal instanceof SVGLength);
|
| + assert_equals(rectElement.width.baseVal.value, 0);
|
| +
|
| + // Check that lengths are dynamic, caching value in a local variable and modifying it, should take effect.
|
| + var numRef = rectElement.width.baseVal;
|
| + numRef.value = 100;
|
| + assert_equals(numRef.value, 100);
|
| + assert_equals(rectElement.width.baseVal.value, 100);
|
| +
|
| + // Check that assigning to baseVal has no effect, as no setter is defined.
|
| + rectElement.width.baseVal = -1;
|
| + assert_equals(rectElement.width.baseVal.value, 100);
|
| + rectElement.width.baseVal = 'aString';
|
| + assert_equals(rectElement.width.baseVal.value, 100);
|
| + rectElement.width.baseVal = rectElement;
|
| + assert_equals(rectElement.width.baseVal.value, 100);
|
| +
|
| + // Check that the width baseVal type has not been changed.
|
| + assert_true(rectElement.width.baseVal instanceof SVGLength);
|
| +});
|
| +</script>
|
|
|