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.5.4.13 - XMLList hasSimpleContent()");
11
TEST(1, true, XMLList.prototype.hasOwnProperty("hasSimpleContent"));
13
// One element should be same as XML case
16
<alpha attr1="value1">
24
<foxtrot attr2="value2">five</foxtrot>
25
<golf attr3="value3" />
30
<india><juliet /></india>
34
TEST(2, false, x.hasSimpleContent());
35
TEST(3, true, x.bravo.hasSimpleContent());
36
TEST(4, false, x.charlie.hasSimpleContent());
37
TEST(5, true, x.delta.hasSimpleContent());
38
TEST(6, true, x.foxtrot.hasSimpleContent());
39
TEST(7, true, x.golf.hasSimpleContent());
40
TEST(8, true, x.hotel.hasSimpleContent());
41
TEST(9, true, x.@attr1.hasSimpleContent());
42
TEST(10, true, x.bravo.child(0).hasSimpleContent());
43
TEST(11, false, x.india.hasSimpleContent());
45
// More than one element is complex if one or more things in the list are elements.
52
TEST(12, false, x.hasSimpleContent());
60
TEST(13, false, x.*.hasSimpleContent());
63
<root attr1="value1" attr2="value2">
67
TEST(14, true, x.@*.hasSimpleContent());