summaryrefslogtreecommitdiffstats
path: root/devtools/server/tests/mochitest/inspector-traversal-data.html
blob: 45b8c2ededc4f3f71da6f5069dac50a4fd5eeb2e (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
87
88
89
90
<html>
<head>
  <meta charset="UTF-8">
  <title>Inspector Traversal Test Data</title>
  <style type="text/css">
    #pseudo::before {
      content: "before";
    }
    #pseudo::after {
      content: "after";
    }
    #pseudo-empty::before {
      content: "before an empty element";
    }
    #shadow::before {
      content: "Testing ::before on a shadow host";
    }
  </style>
  <script type="text/javascript">
    window.onload = function() {

      // Set up a basic shadow DOM
      var host = document.querySelector('#shadow');
      if (host.createShadowRoot) {
        var root = host.createShadowRoot();
        root.innerHTML = '<h3>Shadow <em>DOM</em></h3><select multiple></select>';
      }

      // Put a copy of the body in an iframe to test frame traversal.
      var body = document.querySelector("body");
      var data = "data:text/html,<html>" + body.outerHTML + "<html>";
      var iframe = document.createElement("iframe");
      iframe.setAttribute("id", "childFrame");
      iframe.onload = function() {
        window.opener.postMessage('ready', '*')
      };
      iframe.src = data;
      body.appendChild(iframe);
    }
  </script>
</head>
<body style="background-color:white">
  <h1>Inspector Actor Tests</h1>
  <span id="longstring">longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong</span>
  <span id="shortstring">short</span>
  <span id="empty"></span>
  <div id="longlist" data-test="exists">
    <div id="a">a</div>
    <div id="b">b</div>
    <div id="c">c</div>
    <div id="d">d</div>
    <div id="e">e</div>
    <div id="f">f</div>
    <div id="g">g</div>
    <div id="h">h</div>
    <div id="i">i</div>
    <div id="j">j</div>
    <div id="k">k</div>
    <div id="l">l</div>
    <div id="m">m</div>
    <div id="n">n</div>
    <div id="o">o</div>
    <div id="p">p</div>
    <div id="q">q</div>
    <div id="r">r</div>
    <div id="s">s</div>
    <div id="t">t</div>
    <div id="u">u</div>
    <div id="v">v</div>
    <div id="w">w</div>
    <div id="x">x</div>
    <div id="y">y</div>
    <div id="z">z</div>
  </div>
  <div id="longlist-sibling">
    <div id="longlist-sibling-firstchild"></div>
  </div>
  <p id="edit-html"></p>

  <select multiple><option>one</option><option>two</option></select>
  <div id="pseudo"><span>middle</span></div>
  <div id="pseudo-empty"></div>
  <div id="shadow">light dom</div>
  <object>
      <div id="1"></div>
  </object>
  <div class="node-to-duplicate"></div>
  <div id="scroll-into-view" style="margin-top: 1000px;">scroll</div>
</body>
</html>