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

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

Issue 263353004: HTMLAnchorElement.text should not be readonly (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
Index: LayoutTests/fast/dom/HTMLAnchorElement/set-text.html
diff --git a/LayoutTests/fast/dom/HTMLAnchorElement/set-text.html b/LayoutTests/fast/dom/HTMLAnchorElement/set-text.html
new file mode 100644
index 0000000000000000000000000000000000000000..b4427b7da9c4de7dfeab884e2e9bf4be481c033e
--- /dev/null
+++ b/LayoutTests/fast/dom/HTMLAnchorElement/set-text.html
@@ -0,0 +1,26 @@
+<!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 can be set.");
+
+var a = document.createElement("a");
+shouldBe("a.__proto__", "HTMLAnchorElement.prototype");
+
+shouldBeEqualToString("a.textContent", "");
+shouldBeEqualToString("a.text", "");
+
+a.textContent = "text1";
+shouldBeEqualToString("a.textContent", "text1");
+shouldBeEqualToString("a.text", "text1");
+
+a.text = "text2";
+shouldBeEqualToString("a.textContent", "text2");
+shouldBeEqualToString("a.text", "text2");
+</script>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/fast/dom/HTMLAnchorElement/set-text-expected.txt » ('j') | Source/core/html/HTMLAnchorElement.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698