1<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
2         class="reftest-wait"
3onload="
4var result = '';
5try {
6  document.commandDispatcher.advanceFocusIntoSubtree({});
7  result += '1';
8} catch (ex) {
9  result += '.';
10}
11
12try {
13  document.commandDispatcher.advanceFocusIntoSubtree(document.documentElement);
14  result += '2';
15} catch (ex) {
16  result += '.';
17}
18
19try {
20  document.commandDispatcher.advanceFocusIntoSubtree(null);
21  result += '3';
22} catch (ex) {
23  result += '.';
24}
25
26try {
27  document.commandDispatcher.focusedElement = {};
28  result += '4';
29} catch (ex) {
30  result += '.';
31}
32
33try {
34  document.commandDispatcher.focusedElement = document.documentElement;
35  result += '5';
36} catch (ex) {
37  result += '.';
38}
39
40try {
41  document.commandDispatcher.focusedElement = null;
42  result += '6';
43} catch (ex) {
44  result += '.';
45}
46
47try {
48  document.popupNode = {};
49  result += '7';
50} catch (ex) {
51  result += '.';
52}
53
54try {
55  document.popupNode = document.documentElement;
56  result += '8';
57} catch (ex) {
58  result += '.';
59}
60
61try {
62  document.popupNode = null;
63  result += '9';
64} catch (ex) {
65  result += '.';
66}
67
68try {
69  document.commandDispatcher.focusedWindow = {};
70  result += 'a';
71} catch (ex) {
72  result += '.';
73}
74
75try {
76  document.commandDispatcher.focusedWindow = null;
77  result += 'b';
78} catch (ex) {
79  result += '.';
80}
81
82try {
83  document.commandDispatcher.focusedWindow = window;
84  result += 'c';
85} catch (ex) {
86  result += '.';
87}
88
89document.documentElement.textContent = result == '.23.56.89.bc' ? 'PASSED' : 'FAILED';
90if (document.documentElement.textContent == 'PASSED') {
91  document.documentElement.removeAttribute('class');
92}
93"/>
94