1 // test 70: XML encoding test
2 // q.v. XML 1.0, section 4.3.3 Character Encoding in Entities
3 // this only tests one of a large number of conditions that should cause fatal errors
5 function runEncodingTest(event)
7 debug("Testing: " + encodingTests[currentTest-1]);
8 shouldBeEqualToString("iframe.contentDocument.documentElement.tagName", "root");
9 shouldBeTrue("iframe.contentDocument.documentElement.getElementsByTagName('test').length < 1");
10 setTimeout(runNextTest, 0);
15 "invalid-xml-utf8.xml",
16 "invalid-xml-utf16.xml",
17 "invalid-xml-shift-jis.xml",
18 "invalid-xml-x-mac-thai.xml",
21 function runNextTest()
23 if (currentTest >= encodingTests.length) {
24 var script = document.createElement("script");
25 script.src = "../js/resources/js-test-post.js";
26 if (window.layoutTestController)
27 script.setAttribute("onload", "layoutTestController.notifyDone()");
28 document.body.appendChild(script);
29 iframe.parentNode.removeChild(iframe);
32 iframe.src = "resources/" + encodingTests[currentTest++];
35 if (window.layoutTestController)
36 layoutTestController.waitUntilDone();
38 var iframe = document.createElement("iframe");
39 document.body.appendChild(iframe);
40 iframe.onload = runEncodingTest;