summaryrefslogtreecommitdiffstats
path: root/layout/base/tests/test_frame_reconstruction_body_writing_mode.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
commit6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch)
treea68f146d7fa01f0134297619fbe7e33db084e0aa /layout/base/tests/test_frame_reconstruction_body_writing_mode.html
parentInitial commit. (diff)
downloadthunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.tar.xz
thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.zip
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/base/tests/test_frame_reconstruction_body_writing_mode.html')
-rw-r--r--layout/base/tests/test_frame_reconstruction_body_writing_mode.html34
1 files changed, 34 insertions, 0 deletions
diff --git a/layout/base/tests/test_frame_reconstruction_body_writing_mode.html b/layout/base/tests/test_frame_reconstruction_body_writing_mode.html
new file mode 100644
index 0000000000..70c7e3a0f0
--- /dev/null
+++ b/layout/base/tests/test_frame_reconstruction_body_writing_mode.html
@@ -0,0 +1,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>