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

Unified Diff: LayoutTests/fast/dom/HTMLAnchorElement/get-text.html

Issue 272693002: Make HTMLAnchorElement.text getter behave according to specification (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/dom/HTMLAnchorElement/get-text-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/dom/HTMLAnchorElement/get-text.html
diff --git a/LayoutTests/fast/dom/HTMLAnchorElement/get-text.html b/LayoutTests/fast/dom/HTMLAnchorElement/get-text.html
new file mode 100644
index 0000000000000000000000000000000000000000..df897edebbe3e25f32fad72d35c218e885b1d868
--- /dev/null
+++ b/LayoutTests/fast/dom/HTMLAnchorElement/get-text.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link rel="help" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#dom-a-text">
+<script src="../../../resources/js-test.js"></script>
+</head>
+<body>
+<script>
+description("Tests that HTMLAnchorElement.text returns the same value as the textContent attribute.");
+
+var div = document.createElement('div');
+div.innerHTML = '<a>a<br>b</a>';
+var a = div.firstChild;
+shouldBe("a.__proto__", "HTMLAnchorElement.prototype");
+
+shouldBeEqualToString('a.text', 'ab');
+shouldBeEqualToString('a.textContent', 'ab');
+</script>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/fast/dom/HTMLAnchorElement/get-text-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698