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

Side by Side Diff: third_party/WebKit/LayoutTests/svg/dom/href-semantics.html

Issue 1917843002: Return the 'active' value for SVGURIReference.href.animVal (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Just a note Created 4 years, 7 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/Source/core/svg/SVGAnimatedHref.cpp » ('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> 1 <!DOCTYPE html>
2 <title>SVGURIReference.href IDL semantics</title> 2 <title>SVGURIReference.href IDL semantics</title>
3 <script src="../../resources/testharness.js"></script> 3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script> 4 <script src="../../resources/testharnessreport.js"></script>
5 <script> 5 <script>
6 const svgNs = 'http://www.w3.org/2000/svg'; 6 const svgNs = 'http://www.w3.org/2000/svg';
7 const xlinkNs = 'http://www.w3.org/1999/xlink'; 7 const xlinkNs = 'http://www.w3.org/1999/xlink';
8 8
9 test(function() { 9 test(function() {
10 var element = document.createElementNS(svgNs, 'a'); 10 var element = document.createElementNS(svgNs, 'a');
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 var element = document.createElementNS(svgNs, 'a'); 127 var element = document.createElementNS(svgNs, 'a');
128 element.setAttributeNS(xlinkNs, 'xlink:href', 'bar'); 128 element.setAttributeNS(xlinkNs, 'xlink:href', 'bar');
129 assert_false(element.hasAttributeNS(null, 'href'), '"href" does not exist'); 129 assert_false(element.hasAttributeNS(null, 'href'), '"href" does not exist');
130 assert_true(element.hasAttributeNS(xlinkNs, 'href'), '"xlink:href" exists'); 130 assert_true(element.hasAttributeNS(xlinkNs, 'href'), '"xlink:href" exists');
131 assert_equals(element.href.baseVal, 'bar', 'baseVal reflects "xlink:href"'); 131 assert_equals(element.href.baseVal, 'bar', 'baseVal reflects "xlink:href"');
132 132
133 element.removeAttributeNS(xlinkNs, 'href'); 133 element.removeAttributeNS(xlinkNs, 'href');
134 assert_false(element.hasAttributeNS(xlinkNs, 'href'), '"xlink:href" no longe r exist'); 134 assert_false(element.hasAttributeNS(xlinkNs, 'href'), '"xlink:href" no longe r exist');
135 assert_equals(element.href.baseVal, ''); 135 assert_equals(element.href.baseVal, '');
136 }, document.title+', IDL href reflects "xlink:href"; removeAttribute(xlink:href) w/o NS-prefix resets to default.'); 136 }, document.title+', IDL href reflects "xlink:href"; removeAttribute(xlink:href) w/o NS-prefix resets to default.');
137
138 test(function() {
139 var element = document.createElementNS(svgNs, 'a');
140 element.setAttributeNS(xlinkNs, 'xlink:href', 'bar');
141 assert_false(element.hasAttributeNS(null, 'href'), '"href" does not exist');
142 assert_true(element.hasAttributeNS(xlinkNs, 'href'), '"xlink:href" exists');
143 assert_equals(element.href.baseVal, 'bar', 'baseVal reflects "xlink:href"');
144 assert_equals(element.href.animVal, 'bar', 'animVal reflects "xlink:href"');
145 }, document.title+', href.animVal reflects "xlink:href" when it is set.');
146
147 test(function() {
148 var element = document.createElementNS(svgNs, 'a');
149 element.setAttributeNS(null, 'href', 'bar');
150 assert_true(element.hasAttributeNS(null, 'href'), '"href" exists');
151 assert_false(element.hasAttributeNS(xlinkNs, 'href'), '"xlink:href" does not exist');
152 assert_equals(element.href.baseVal, 'bar', 'baseVal reflects "href"');
153 assert_equals(element.href.animVal, 'bar', 'animVal reflects "href"');
154 }, document.title+', href.animVal reflects "href" when it is set.');
137 </script> 155 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/svg/SVGAnimatedHref.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698