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

Side by Side 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 unified diff | 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 »
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>SVGAnimatedAngle interface - utilizing the orientAngle property of SVGMar kerElement</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 SVGAnimatedAngle API - utilizing the orientAngle prope rty of SVGMarkerElement.
8 <div id="console"></div> 8
9 <script src="script-tests/SVGAnimatedAngle.js"></script> 9 var markerElement = document.createElementNS("http://www.w3.org/2000/svg", "ma rker");
10 </body> 10
11 </html> 11 // Check initial orientAngle value.
12 assert_true(markerElement.orientAngle instanceof SVGAnimatedAngle);
13 assert_true(markerElement.orientAngle.baseVal instanceof SVGAngle);
14 assert_equals(markerElement.orientAngle.baseVal.value, 0);
15
16 // Check that angles are dynamic, caching value in a local variable and modify ing it, should take effect.
17 var numRef = markerElement.orientAngle.baseVal;
18 numRef.value = 100;
19 assert_equals(numRef.value, 100);
20 assert_equals(markerElement.orientAngle.baseVal.value, 100);
21
22 // Check that assigning to baseVal has no effect, as no setter is defined.
23 markerElement.orientAngle.baseVal = -1;
24 assert_equals(markerElement.orientAngle.baseVal.value, 100);
25 markerElement.orientAngle.baseVal = 'aString';
26 assert_equals(markerElement.orientAngle.baseVal.value, 100);
27 markerElement.orientAngle.baseVal = markerElement;
28 assert_equals(markerElement.orientAngle.baseVal.value, 100);
29
30 // Check that the orientAngle baseVal type has not been changed.
31 assert_true(markerElement.orientAngle.baseVal instanceof SVGAngle);
32 });
33 </script>
OLDNEW
« 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