summaryrefslogtreecommitdiffstats
path: root/accessible/tests/mochitest/treeupdate/test_bug1189277.html
blob: 9c995d49ed97d80706a99bcdb88d4f8ff34b4b56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<html>

<head>
  <title>Test hide/show events for HTMLListBulletAccessibles on list restyle</title>
  <link rel="stylesheet" type="text/css"
        href="chrome://mochikit/content/tests/SimpleTest/test.css" />

  <script type="application/javascript"
          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>

  <script type="application/javascript"
          src="../common.js"></script>
  <script type="application/javascript"
          src="../name.js"></script>
  <script type="application/javascript"
          src="../events.js"></script>

  <script type="application/javascript">
    function runTest()
    {
      this.containerNode = getNode("outerDiv");

      this.eventSeq = [
        new invokerChecker(EVENT_HIDE, getNode("child")),
        new invokerChecker(EVENT_HIDE, getNode("childDoc")),
        new invokerChecker(EVENT_SHOW, "newChildDoc"),
        new invokerChecker(EVENT_REORDER, this.containerNode)
      ];

      this.invoke = function runTest_invoke()
      {
        this.containerNode.removeChild(getNode("child"));

        var docContainer = getNode("docContainer");
        var iframe = document.createElement("iframe");
        iframe.setAttribute("src", "http://example.com");
        iframe.setAttribute("id", "newChildDoc");

        docContainer.removeChild(getNode("childDoc"));
        docContainer.appendChild(iframe);
      }

      this.getID = function runTest_getID()
      {
        return "check show events are not incorrectly coalesced";
      }
    }

    //enableLogging("tree");
    gA11yEventDumpToConsole = true;
    var gQueue = null;
    function doTest()
    {
      gQueue = new eventQueue();
      gQueue.push(new runTest());
      gQueue.invoke(); // SimpleTest.finish();
    }

    SimpleTest.waitForExplicitFinish();
    addA11yLoadEvent(doTest);
  </script>

</head>

<body>

  <a target="_blank"
     href="https://bugzilla.mozilla.org/show_bug.cgi?id=1189277"
     title="content process crash caused by missing show event">
    Mozilla Bug 1189277
  </a>
  <p id="display"></p>
  <div id="content" style="display: none"></div>
  <pre id="test">
  </pre>

  <div id="outerDiv">
    <div id="child">foo</div>
    <div id="docContainer">
      <iframe id="childDoc" src="about:blank">
      </iframe>
    </div>
  </div>

</body>
</html>