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

Side by Side Diff: third_party/WebKit/LayoutTests/svg/dom/SVGAnimatedLength.html

Issue 2713833002: Convert LayoutTests/svg/dom/SVGAnimated*.html js-tests.js to testharness.js based tests. (Closed)
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/svg/dom/SVGAnimatedLength-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> 1 <!DOCTYPE HTML>
2 <html> 2 <title>SVGAnimatedLength interface - utilizing the width property of SVGRectElem ent</title>
3 <head> 3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/js-test.js"></script> 4 <script src="../../resources/testharnessreport.js"></script>
5 </head> 5 <script>
6 <body> 6 test(function() {
7 <p id="description"></p> 7 // This test checks the SVGAnimatedLength API - utilizing the width property o f SVGRectElement.
8 <div id="console"></div> 8
9 <script src="script-tests/SVGAnimatedLength.js"></script> 9 var rectElement = document.createElementNS("http://www.w3.org/2000/svg", "rect ");
10 </body> 10
11 </html> 11 // Check initial width value.
12 assert_true(rectElement.width instanceof SVGAnimatedLength);
13 assert_true(rectElement.width.baseVal instanceof SVGLength);
14 assert_equals(rectElement.width.baseVal.value, 0);
15
16 // Check that lengths are dynamic, caching value in a local variable and modif ying it, should take effect.
17 var numRef = rectElement.width.baseVal;
18 numRef.value = 100;
19 assert_equals(numRef.value, 100);
20 assert_equals(rectElement.width.baseVal.value, 100);
21
22 // Check that assigning to baseVal has no effect, as no setter is defined.
23 rectElement.width.baseVal = -1;
24 assert_equals(rectElement.width.baseVal.value, 100);
25 rectElement.width.baseVal = 'aString';
26 assert_equals(rectElement.width.baseVal.value, 100);
27 rectElement.width.baseVal = rectElement;
28 assert_equals(rectElement.width.baseVal.value, 100);
29
30 // Check that the width baseVal type has not been changed.
31 assert_true(rectElement.width.baseVal instanceof SVGLength);
32 });
33 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/svg/dom/SVGAnimatedLength-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698