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

Side by Side Diff: LayoutTests/fast/dom/EntityReference/script-tests/readonly-exceptions.js

Issue 14990005: Remove ENTITY_REFERENCE_NODE (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove some empty lines Created 7 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 description("Test to make sure EntityReference nodes are always treated readonly ")
2
3 var xmlDoc = document.implementation.createDocument("http://www.w3.org/1999/xhtm l", "html", null);
4 var xmlDoc2 = document.implementation.createDocument("http://www.w3.org/1999/xht ml", "html", null);
5 var entityReference = xmlDoc.createEntityReference("gt");
6
7 shouldThrow("xmlDoc2.adoptNode(entityReference)");
8 shouldBe("entityReference.ownerDocument", "xmlDoc")
9
10 // nodeValue is defined to be null for Entity Reference nodes, and thus should s ilently fail to modify
11 // Spec is ambigious as to if we should throw here or not. I've requested clari fication:
12 // http://lists.w3.org/Archives/Public/www-dom/2008JanMar/0009.html
13 shouldThrow("entityReference.nodeValue = 'foo'");
14 shouldBe("entityReference.nodeValue", "null");
15
16 shouldThrow("entityReference.prefix = 'foo'");
17 shouldBe("entityReference.prefix", "null");
18
19 shouldThrow("entityReference.textContent = 'foo'");
20 shouldBe("entityReference.textContent", "'>'");
21
22 var childrenBeforeFailedAppend = entityReference.childNodes.length;
23 shouldBe("childrenBeforeFailedAppend", "1");
24 var text = document.createTextNode("FAIL");
25 shouldThrow("entityReference.appendChild(text)");
26 shouldBe("entityReference.childNodes.length", "childrenBeforeFailedAppend");
27
28 childrenBeforeFailedAppend = entityReference.childNodes.length;
29 shouldBe("childrenBeforeFailedAppend", "1");
30 shouldThrow("entityReference.insertBefore(text, entityReference.firstChild)");
31 shouldBe("entityReference.childNodes.length", "childrenBeforeFailedAppend");
OLDNEW
« no previous file with comments | « LayoutTests/fast/dom/EntityReference/script-tests/TEMPLATE.html ('k') | LayoutTests/fast/dom/Node/initial-values-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698