Bug 1888590 - Mark some subtests on trusted-types-event-handlers.html as failing...
[gecko.git] / docshell / test / browser / browser_bug234628-5.js
blob77753ed78d4784d1c8e8f8cbd2bf3f0441ce325c
1 function test() {
2   var rootDir = "http://mochi.test:8888/browser/docshell/test/browser/";
3   runCharsetTest(
4     rootDir + "file_bug234628-5.html",
5     afterOpen,
6     afterChangeCharset
7   );
10 function afterOpen() {
11   is(
12     content.document.documentElement.textContent.indexOf("\u20AC"),
13     146,
14     "Parent doc should be windows-1252 initially"
15   );
17   is(
18     content.frames[0].document.documentElement.textContent.indexOf("\u20AC"),
19     87,
20     "Child doc should be utf-16 initially"
21   );
24 function afterChangeCharset() {
25   is(
26     content.document.documentElement.textContent.indexOf("\u20AC"),
27     146,
28     "Parent doc should be windows-1252 subsequently"
29   );
30   is(
31     content.frames[0].document.documentElement.textContent.indexOf("\u20AC"),
32     87,
33     "Child doc should decode as utf-16 subsequently"
34   );
36   is(
37     content.document.characterSet,
38     "windows-1252",
39     "Parent doc should report windows-1252 subsequently"
40   );
41   is(
42     content.frames[0].document.characterSet,
43     "UTF-16LE",
44     "Child doc should report UTF-16LE subsequently"
45   );