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

Unified 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, 8 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/Source/core/svg/SVGAnimatedHref.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/svg/dom/href-semantics.html
diff --git a/third_party/WebKit/LayoutTests/svg/dom/href-semantics.html b/third_party/WebKit/LayoutTests/svg/dom/href-semantics.html
index 4d4298232ec8d54620d803430b0b7f4211f5fbcc..06562425f5378bda52399e16e7720abf968459b0 100644
--- a/third_party/WebKit/LayoutTests/svg/dom/href-semantics.html
+++ b/third_party/WebKit/LayoutTests/svg/dom/href-semantics.html
@@ -134,4 +134,22 @@ test(function() {
assert_false(element.hasAttributeNS(xlinkNs, 'href'), '"xlink:href" no longer exist');
assert_equals(element.href.baseVal, '');
}, document.title+', IDL href reflects "xlink:href"; removeAttribute(xlink:href) w/o NS-prefix resets to default.');
+
+test(function() {
+ var element = document.createElementNS(svgNs, 'a');
+ element.setAttributeNS(xlinkNs, 'xlink:href', 'bar');
+ assert_false(element.hasAttributeNS(null, 'href'), '"href" does not exist');
+ assert_true(element.hasAttributeNS(xlinkNs, 'href'), '"xlink:href" exists');
+ assert_equals(element.href.baseVal, 'bar', 'baseVal reflects "xlink:href"');
+ assert_equals(element.href.animVal, 'bar', 'animVal reflects "xlink:href"');
+}, document.title+', href.animVal reflects "xlink:href" when it is set.');
+
+test(function() {
+ var element = document.createElementNS(svgNs, 'a');
+ element.setAttributeNS(null, 'href', 'bar');
+ assert_true(element.hasAttributeNS(null, 'href'), '"href" exists');
+ assert_false(element.hasAttributeNS(xlinkNs, 'href'), '"xlink:href" does not exist');
+ assert_equals(element.href.baseVal, 'bar', 'baseVal reflects "href"');
+ assert_equals(element.href.animVal, 'bar', 'animVal reflects "href"');
+}, document.title+', href.animVal reflects "href" when it is set.');
</script>
« 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