summaryrefslogtreecommitdiffstats
path: root/accessible/tests/mochitest/text/test_textBounds.html
blob: 66e7f1a93ffc4a0c712074be8fd42c7acdb0200b (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
<!DOCTYPE html>
<html>
<head>
  <title>TextBounds tests</title>
  <link rel="stylesheet" type="text/css"
        href="chrome://mochikit/content/tests/SimpleTest/test.css" />

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

  <script type="application/javascript">
    function doTest() {
      // Returned rect should be all 0 if no frame; e.g. display: contents.
      testTextBounds(
        "displayContents", 0, 0, [0, 0, 0, 0], COORDTYPE_SCREEN_RELATIVE
      );
      SimpleTest.finish();
    }

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

  <p id="display"></p>
  <div id="content" style="display: none"></div>
  <pre id="test">
  </pre>

  <section id="displayContents" style="display: contents;"></section>
</body>
</html>