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

Side by Side Diff: LayoutTests/dom/xhtml/level3/core/nodeisdefaultnamespace16.js

Issue 740223003: Revive tests for Document.createAttributeNS() and Element.setAttributeNodeNS() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: deprecation messages Created 6 years, 1 month 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
1 1
2 /* 2 /*
3 Copyright © 2001-2004 World Wide Web Consortium, 3 Copyright © 2001-2004 World Wide Web Consortium,
4 (Massachusetts Institute of Technology, European Research Consortium 4 (Massachusetts Institute of Technology, European Research Consortium
5 for Informatics and Mathematics, Keio University). All 5 for Informatics and Mathematics, Keio University). All
6 Rights Reserved. This work is distributed under the W3C® Software License [1] i n the 6 Rights Reserved. This work is distributed under the W3C® Software License [1] i n the
7 hope that it will be useful, but WITHOUT ANY WARRANTY; without even 7 hope that it will be useful, but WITHOUT ANY WARRANTY; without even
8 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9 9
10 [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 10 [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
11 */ 11 */
12 12
13 13
14 14
15 /** 15 /**
16 * Gets URI that identifies the test. 16 * Gets URI that identifies the test.
17 * @return uri identifier of test 17 * @return uri identifier of test
18 */ 18 */
19 function getTargetURI() { 19 function getTargetURI() {
20 return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode0 4"; 20 return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisdefaultnam espace16";
21 } 21 }
22 22
23 var docsLoaded = -1000000; 23 var docsLoaded = -1000000;
24 var builder = null; 24 var builder = null;
25 25
26 // 26 //
27 // This function is called by the testing framework before 27 // This function is called by the testing framework before
28 // running the test suite. 28 // running the test suite.
29 // 29 //
30 // If there are no configuration exceptions, asynchronous 30 // If there are no configuration exceptions, asynchronous
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 // body of the test to be executed. 68 // body of the test to be executed.
69 function loadComplete() { 69 function loadComplete() {
70 if (++docsLoaded == 1) { 70 if (++docsLoaded == 1) {
71 setUpPageStatus = 'complete'; 71 setUpPageStatus = 'complete';
72 } 72 }
73 } 73 }
74 74
75 75
76 /** 76 /**
77 * 77 *
78 » Create a new Element node in this Document. return its ownerDocument an d check if the 78 » Using isDefaultNamespace on a new Attribute node with with a namespace U RI
79 » the ownerDocument is equal to this Document using isEqualNode. 79 » and no prefix and verify if the value returned is false since default n amespaces
80 » do not apply directly to attributes.
80 81
81 * @author IBM 82 * @author IBM
82 * @author Neil Delima 83 * @author Neil Delima
83 * @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isEqua lNode 84 * @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-isDefa ultNamespace
84 */ 85 */
85 function nodeisequalnode04() { 86 function nodeisdefaultnamespace16() {
86 var success; 87 var success;
87 if(checkInitialization(builder, "nodeisequalnode04") != null) return; 88 if(checkInitialization(builder, "nodeisdefaultnamespace16") != null) return;
88 var doc; 89 var doc;
89 var ownerDoc; 90 var attr;
90 var elem; 91 var isDefault;
91 var isEqual;
92 92
93 var docRef = null; 93 var docRef = null;
94 if (typeof(this.doc) != 'undefined') { 94 if (typeof(this.doc) != 'undefined') {
95 docRef = this.doc; 95 docRef = this.doc;
96 } 96 }
97 doc = load(docRef, "doc", "barfoo"); 97 doc = load(docRef, "doc", "barfoo");
98 elem = doc.createElementNS("http://www.w3.org/1999/xhtml","xhtml:p"); 98 attr = doc.createAttributeNS("http://www.w3.org/XML/1998/namespace","lang" );
99 ownerDoc = elem.ownerDocument; 99 isDefault = attr.isDefaultNamespace("http://www.w3.org/XML/1998/namespace" );
100 100 assertFalse("nodeisdefaultnamespace16",isDefault);
101 isEqual = doc.isEqualNode(ownerDoc);
102 assertTrue("nodeisequalnode04",isEqual);
103 101
104 } 102 }
105 103
106 104
107 105
108 106
109 function runTest() { 107 function runTest() {
110 nodeisequalnode04(); 108 nodeisdefaultnamespace16();
111 } 109 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698