1
// |reftest| pref(javascript.options.xml.content,true)
2
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
4
* This Source Code Form is subject to the terms of the Mozilla Public
5
* License, v. 2.0. If a copy of the MPL was not distributed with this
6
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
9
START("13.4.2 - XML Constructor");
12
TEST(1, "xml", typeof(x));
13
TEST(2, true, x instanceof XML);
17
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
18
xmlns:stock="http://mycompany.com/stocks"
19
soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
21
<stock:GetLastTradePrice>
22
<stock:symbol>DIS</stock:symbol>
23
</stock:GetLastTradePrice>
28
TEST_XML(3, correct.toXMLString(), x);
32
" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"" +
33
" xmlns:stock=\"http://mycompany.com/stocks\"" +
34
" soap:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\">" +
36
" <stock:GetLastTradePrice>" +
37
" <stock:symbol>DIS</stock:symbol>" +
38
" </stock:GetLastTradePrice>" +
45
// Make sure it's a copy
53
x.bravo.prependChild(<charlie>two</charlie>);
69
// Undefined and null should behave like ""
73
x = new XML(undefined);
77
x = new XML("<hello a='\"' />");
78
TEST_XML(10, "<hello a=\""\"/>", x);