blob: 859fa2143be8a619517647a34653b0a4b2297c6b [file] [log] [blame]
* Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
* for details. All rights reserved. Use of this source code is governed by a
* BSD-style license that can be found in the LICENSE file.
* @description
import "dart:html";
import "../../testcommon.dart";
main() {
var doc = new DomParser()
<html xmlns="">
<body onload="test();">
<p>Test for <a href="">bug 11998</a>:
Incorrect serialization of quotation marks in XML attributes.</p>
<!-- Currently, WebKit doesn't serialize the namespace unless it's explicitly specified, bug 5262 -->
<div xmlns="" id="testDiv&#34;&#39;&#38;&#60;&#62;"/>
''', 'text/xml');
var serialized = (new XmlSerializer())
shouldBeTrue(serialized == "<div xmlns=\"\" id=\"testDiv&quot;'&amp;&lt;&gt;\"/>" ||
serialized == "<div xmlns=\"\" id=\"testDiv&quot;'&amp;&lt;&gt;\"></div>" ||
serialized == "<div xmlns=\"\" id=\"testDiv&quot;'&amp;&lt;>\"/>" ||
serialized == "<div xmlns=\"\" id=\"testDiv&quot;'&amp;&lt;>\"></div>");