summaryrefslogtreecommitdiffstats
path: root/dom/xbl/test/file_bug591198_inner.html
blob: 89b547a39fa6d1f5d309ca6d65914a7b566d8af4 (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
<!DOCTYPE HTML>
<html>
  <head>
    <style>
      #b {
        -moz-binding: url("file_bug591198_xbl.xml#xbltest");
      }
      span {
        white-space: nowrap;
      }
    </style>
    <script>
function sendResults() {
  var res = {
    widths: []
  };

  ps = document.getElementsByTagName('span');
  for (var i = 0; i < ps.length; i++) {
    res.widths.push(ps[i].offsetWidth);
  }
  
  try {
    res.anonChildCount =
      SpecialPowers.wrap(document).getAnonymousNodes(document.getElementById('b')).length;
  }
  catch (ex) {}

  parent.postMessage(JSON.stringify(res), "*");
}
    </script>
  </head>
  <body onload="sendResults();">
    <div><span id=b>long long text here</span></div>
    <div><span>long long text here</span></div>
    <div><span>PASS</span></div>
  </body>
</html>