OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <STYLE> | 3 <STYLE> |
4 pre { border:1px solid blue } | 4 pre { border:1px solid blue } |
5 span { font-weight: bold } | 5 span { font-weight: bold } |
6 .success { color: green; } | 6 .success { color: green; } |
7 .failure { color: red; } | 7 .failure { color: red; } |
8 </STYLE> | 8 </STYLE> |
9 </head> | 9 </head> |
10 <body id="body"> | 10 <body id="body"> |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 addSectionHeader("Value getParameter(in DOMString namespaceURI, in DOMString loc
alName)"); | 239 addSectionHeader("Value getParameter(in DOMString namespaceURI, in DOMString loc
alName)"); |
240 | 240 |
241 // 5.1 pass undefined name | 241 // 5.1 pass undefined name |
242 | 242 |
243 var testname = "pass getParameter an undefined name"; | 243 var testname = "pass getParameter an undefined name"; |
244 addResultExpectValue(testname, processor.getParameter(undefined, undefined), "Su
ccess"); | 244 addResultExpectValue(testname, processor.getParameter(undefined, undefined), "Su
ccess"); |
245 | 245 |
246 // 5.2 pass getParameter a name which has not been set | 246 // 5.2 pass getParameter a name which has not been set |
247 | 247 |
248 var testname = "pass getParameter a name which has not been set"; | 248 var testname = "pass getParameter a name which has not been set"; |
249 addResultExpectValue(testname, processor.getParameter(undefined, "hasnotbeenset"
), undefined); | 249 addResultExpectValue(testname, processor.getParameter(undefined, "hasnotbeenset"
), null); |
250 | 250 |
251 // 5.3 verify getParameter actually gets (and set sets) | 251 // 5.3 verify getParameter actually gets (and set sets) |
252 processor.setParameter(null, "test", "testValue"); | 252 processor.setParameter(null, "test", "testValue"); |
253 var testname = "verify getParameter actually gets (and set sets)"; | 253 var testname = "verify getParameter actually gets (and set sets)"; |
254 addResultExpectValue(testname, processor.getParameter(null, "test"), "testValue"
); | 254 addResultExpectValue(testname, processor.getParameter(null, "test"), "testValue"
); |
255 | 255 |
256 | 256 |
257 | 257 |
258 // 6.0 void removeParameter(in DOMString namespaceURI, in DOMString localName); | 258 // 6.0 void removeParameter(in DOMString namespaceURI, in DOMString localName); |
259 addSectionHeader("void removeParameter(in DOMString namespaceURI, in DOMString l
ocalName)"); | 259 addSectionHeader("void removeParameter(in DOMString namespaceURI, in DOMString l
ocalName)"); |
260 // 6.1 pass removeParameter same localname, different namespaces | 260 // 6.1 pass removeParameter same localname, different namespaces |
261 | 261 |
262 processor.setParameter("foo", "foo", "Success"); | 262 processor.setParameter("foo", "foo", "Success"); |
263 processor.setParameter("bar", "foo", "Failure"); | 263 processor.setParameter("bar", "foo", "Failure"); |
264 var testname = "pass removeParameter same localname, different namespaces"; | 264 var testname = "pass removeParameter same localname, different namespaces"; |
265 addResultExpectValue(testname, processor.getParameter("foo", "foo"), "Success"); | 265 addResultExpectValue(testname, processor.getParameter("foo", "foo"), "Success"); |
266 | 266 |
267 // 6.2 pass undefined namespace | 267 // 6.2 pass undefined namespace |
268 | 268 |
269 processor.setParameter(undefined, "test", "testValue"); | 269 processor.setParameter(undefined, "test", "testValue"); |
270 processor.removeParameter(undefined, "test"); | 270 processor.removeParameter(undefined, "test"); |
271 var testname = "verify removeParameter actually removes using undefined namespac
e"; | 271 var testname = "verify removeParameter actually removes using undefined namespac
e"; |
272 addResultExpectValue(testname, processor.getParameter(null, "test"), undefined); | 272 addResultExpectValue(testname, processor.getParameter(null, "test"), null); |
273 | 273 |
274 // 6.3 pass removeParameter undefined name | 274 // 6.3 pass removeParameter undefined name |
275 | 275 |
276 processor.setParameter(undefined, "undefined", "Success"); | 276 processor.setParameter(undefined, "undefined", "Success"); |
277 processor.removeParameter(undefined, undefined); | 277 processor.removeParameter(undefined, undefined); |
278 var testname = "pass removeParameter undefined name"; | 278 var testname = "pass removeParameter undefined name"; |
279 addResultExpectValue(testname, processor.getParameter(undefined, "undefined"), u
ndefined); | 279 addResultExpectValue(testname, processor.getParameter(undefined, "undefined"), n
ull); |
280 | 280 |
281 // 6.4 pass removeParameter a name which has not been set | 281 // 6.4 pass removeParameter a name which has not been set |
282 | 282 |
283 processor.removeParameter(undefined, "neverbeensetforremove"); | 283 processor.removeParameter(undefined, "neverbeensetforremove"); |
284 addResultExpectValue("pass removeParameter a name which has not been set", "Succ
ess", "Success"); | 284 addResultExpectValue("pass removeParameter a name which has not been set", "Succ
ess", "Success"); |
285 | 285 |
286 // 6.5 verify removeParameter actually removes | 286 // 6.5 verify removeParameter actually removes |
287 processor.setParameter(null, "test", "testValue"); | 287 processor.setParameter(null, "test", "testValue"); |
288 processor.removeParameter(null, "test"); | 288 processor.removeParameter(null, "test"); |
289 var testname = "verify removeParameter actually removes"; | 289 var testname = "verify removeParameter actually removes"; |
290 addResultExpectValue(testname, processor.getParameter(null, "test"), undefined); | 290 addResultExpectValue(testname, processor.getParameter(null, "test"), null); |
291 | 291 |
292 | 292 |
293 | 293 |
294 // 7.0 void clearParameters(); | 294 // 7.0 void clearParameters(); |
295 addSectionHeader("void clearParameters()"); | 295 addSectionHeader("void clearParameters()"); |
296 | 296 |
297 // 7.1 call, verify that parameters have been cleared | 297 // 7.1 call, verify that parameters have been cleared |
298 processor.setParameter(null, "test", "testValue"); | 298 processor.setParameter(null, "test", "testValue"); |
299 processor.clearParameters(); | 299 processor.clearParameters(); |
300 var testname = "verify that clearParameters does"; | 300 var testname = "verify that clearParameters does"; |
301 addResultExpectValue(testname, processor.getParameter(null, "test"), undefined); | 301 addResultExpectValue(testname, processor.getParameter(null, "test"), null); |
302 | 302 |
303 | 303 |
304 // 8.0 void reset(); | 304 // 8.0 void reset(); |
305 addSectionHeader("void reset()"); | 305 addSectionHeader("void reset()"); |
306 processor = new XSLTProcessor(); | 306 processor = new XSLTProcessor(); |
307 processor.importStylesheet(xsl1); | 307 processor.importStylesheet(xsl1); |
308 processor.setParameter(null, "test", "testValue"); | 308 processor.setParameter(null, "test", "testValue"); |
309 processor.reset(); | 309 processor.reset(); |
310 | 310 |
311 // 8.1 call, verify that parameters are cleared after reset() | 311 // 8.1 call, verify that parameters are cleared after reset() |
312 var testname = "verify that parameters have been cleared"; | 312 var testname = "verify that parameters have been cleared"; |
313 addResultExpectValue(testname, processor.getParameter(null, "test"), undefined); | 313 addResultExpectValue(testname, processor.getParameter(null, "test"), null); |
314 | 314 |
315 // 8.2 call, verify that stylesheet has been cleared after reset() | 315 // 8.2 call, verify that stylesheet has been cleared after reset() |
316 var testname = "verify that stylesheet has been cleared"; | 316 var testname = "verify that stylesheet has been cleared"; |
317 var resultDocument = processor.transformToDocument(xml); | 317 var resultDocument = processor.transformToDocument(xml); |
318 addResultExpectValueWhenSerialized(testname, resultDocument, undefined); | 318 addResultExpectValueWhenSerialized(testname, resultDocument, undefined); |
319 | 319 |
320 </script> | 320 </script> |
321 | 321 |
322 </body> | 322 </body> |
323 </html> | 323 </html> |
OLD | NEW |