| 1 | /* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
| 2 | |
| 3 | /* This Source Code Form is subject to the terms of the Mozilla Public |
| 4 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
| 5 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
| 6 | |
| 7 | gTestfile = 'regress-291930.js'; |
| 8 | |
| 9 | START("If document starts with comment, document is discarded"); |
| 10 | printBugNumber(291930); |
| 11 | |
| 12 | XML.ignoreComments = false; |
| 13 | try { |
| 14 | var root = new XML("<!-- Sample --> <root/>"); |
| 15 | SHOULD_THROW(1, "SyntaxError"); |
| 16 | } catch (e) { |
| 17 | TEST(1, "error", "error"); |
| 18 | } |
| 19 | |
| 20 | END(); |