summaryrefslogtreecommitdiffstats
path: root/layout/reftests/printing/test-print-selection-iframe.html
blob: b3d39c2c52fa1d9ce28c73e5c6b8ae6d2fb832cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<!DOCTYPE html>
<html reftest-print-range="selection">
<head>
  <meta charset="utf-8">
  <link href="print.css" rel="stylesheet">
  <script>
    function selectNodeById(id) {
      var node = document.getElementById(id);
      var rng = document.createRange();
      rng.selectNode(node);
      window.getSelection().addRange(rng);
    }
  </script>
</head>
<body onload="selectNodeById('selection')">
  <p>This text should not be there</p>
  <p id="selection">This text should appear on page 1</p>
  <iframe src="data:text/html,"></iframe>
</body>
</html>