OLD | NEW |
1 description("setAttributeNS tests adapted from createAttributeNS which in turn w
ere adapted from createElementNS tests attached to webkit bug 16833"); | 1 description("setAttributeNS tests adapted from createAttributeNS which in turn w
ere adapted from createElementNS tests attached to webkit bug 16833"); |
2 | 2 |
3 function assert(c, m) | 3 function assert(c, m) |
4 { | 4 { |
5 if (!c) | 5 if (!c) |
6 testFailed(m); | 6 testFailed(m); |
7 else | 7 else |
8 testPassed(m); | 8 testPassed(m); |
9 } | 9 } |
10 | 10 |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 msg += "; " + test.message; | 117 msg += "; " + test.message; |
118 try { | 118 try { |
119 setFunction.apply(element, test.args.concat([value])); | 119 setFunction.apply(element, test.args.concat([value])); |
120 assert(!("code" in test), msg); | 120 assert(!("code" in test), msg); |
121 } catch (e) { | 121 } catch (e) { |
122 assertEquals(e.code, test.code || "expected no exception", msg); | 122 assertEquals(e.code, test.code || "expected no exception", msg); |
123 } | 123 } |
124 } | 124 } |
125 } | 125 } |
126 | 126 |
127 // Moz throws a "Not enough arguments" exception in these, we don't: | |
128 var element = document.createElement("div"); | |
129 shouldBeUndefined("element.setAttributeNS()"); | |
130 shouldBeUndefined("element.setAttributeNS(\"http://www.example.com\")"); | |
131 shouldBeUndefined("element.setAttributeNS(\"http://www.example.com\", \"foo\")")
; | |
132 | |
133 runNSTests(); | 127 runNSTests(); |
OLD | NEW |