blob: 70c7e3a0f02a77f58a565c7c2ace65e96a92b100 (
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
|
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<title>
Test for Bug 1593752: Test we don't reframe the html element when
inserting a canonical body element with the same writing-mode.
</title>
<link rel="author" title="Ting-Yu Lin" href="tlin@mozilla.com">
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<script>
SimpleTest.waitForExplicitFinish();
const utils = SpecialPowers.getDOMWindowUtils(window);
function runTest() {
document.documentElement.offsetTop;
// We expect to construct only the canonical body because its writing-mode
// is the same as html's writing-mode.
const expectedFrameConstructCount = utils.framesConstructed + 1;
document.body.before(document.createElement("body"));
document.documentElement.offsetTop;
is(utils.framesConstructed, expectedFrameConstructCount,
"We should not reframe <html>!");
SimpleTest.finish();
}
</script>
<body onload="runTest();"></body>
</html>
|