summaryrefslogtreecommitdiffstats
path: root/testing/crashtest
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:37 +0000
commita90a5cba08fdf6c0ceb95101c275108a152a3aed (patch)
tree532507288f3defd7f4dcf1af49698bcb76034855 /testing/crashtest
parentAdding debian version 126.0.1-1. (diff)
downloadfirefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.tar.xz
firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.zip
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/crashtest')
-rw-r--r--testing/crashtest/crashtests.list3
-rw-r--r--testing/crashtest/final/1419902.html34
-rw-r--r--testing/crashtest/final/1758199-1.html54
-rw-r--r--testing/crashtest/final/crashtests.list8
4 files changed, 99 insertions, 0 deletions
diff --git a/testing/crashtest/crashtests.list b/testing/crashtest/crashtests.list
index a7c539daca..30d6bb8f8f 100644
--- a/testing/crashtest/crashtests.list
+++ b/testing/crashtest/crashtests.list
@@ -83,3 +83,6 @@ include ../../widget/crashtests/crashtests.list
include ../../widget/gtk/crashtests/crashtests.list
include ../../xpcom/string/crashtests/crashtests.list
+
+# Tests that must be run at the very end of all other crashtests.
+include final/crashtests.list
diff --git a/testing/crashtest/final/1419902.html b/testing/crashtest/final/1419902.html
new file mode 100644
index 0000000000..9fa9149564
--- /dev/null
+++ b/testing/crashtest/final/1419902.html
@@ -0,0 +1,34 @@
+<html>
+ <head>
+ <script>
+ // Note that despite what it looks like this test does leave windows open
+ // after the test finishes. That's because some of the window.open calls
+ // trigger an exception but still open a window. Because of the
+ // exception, winsToClose.push is not executed and we have no reference
+ // to the window. So far there is no known way to get a reference to it.
+ // It was also tried to give each opened windowed a named target, save
+ // that list of targets, and use window.open("", targetname) to get a
+ // reference to the window. That also doesn't work because either the
+ // window.open calls never end and this page never loads, or if it does
+ // load after a finite time then still some windows are left open for
+ // some reason.
+ var winsToClose = []
+ onbeforeunload = function() {
+ for (let win of winsToClose) {
+ if (win) {
+ win.close();
+ }
+ }
+ };
+ for (let i = 0; i < 38; i++) {
+ customElements.define("custom-element_0", class extends HTMLElement {
+ constructor() {
+ try { o1 = document.createElement("custom-element_0") } catch (e) {}
+ try { winsToClose.push(window.open("javascript:'<html><body>dummy</body></html>';")); } catch (e) {}
+ }
+ })
+ try { o3 = document.createElement("custom-element_0") } catch (e) {}
+ }
+ </script>
+ </head>
+</html>
diff --git a/testing/crashtest/final/1758199-1.html b/testing/crashtest/final/1758199-1.html
new file mode 100644
index 0000000000..3f7c9227a4
--- /dev/null
+++ b/testing/crashtest/final/1758199-1.html
@@ -0,0 +1,54 @@
+<html class="reftest-wait">
+<script>
+let pp;
+let documentElements = [];
+documentElements.push(document.documentElement);
+
+window.onload = () => {
+ documentElements.push(document.documentElement);
+
+ let o = document.getElementById('a')
+ o.parentNode.appendChild(o)
+ pp = SpecialPowers.wrap(self).printPreview();
+ pp?.print()
+ window.requestIdleCallback(() => {
+ documentElements.push(document.documentElement);
+
+ document.write('');
+
+ setTimeout(finish, 100);
+ });
+}
+
+function finish() {
+
+ // The printPreview call above actually opens two print preview windows
+ // because the <embed src='#'> below causes a second one to open. At least
+ // we close the one window we can access, not sure if there is a way to get
+ // ahold of the other window to close it. So this test leaves a window open
+ // after it finishes.
+ try { pp.close(); } catch (e) {}
+
+ if (document.documentElement) {
+ try { document.documentElement.className = ""; } catch (e) {}
+ }
+
+ // The documentElement that the reftest harness looks at to determine if the
+ // test is done is not what document.documentElement points to when this code
+ // is run. So we save all the document.documentElement's we encounter while
+ // running this test and clear all of their class names.
+ for (let de of documentElements) {
+ if (de) {
+ try {
+ de.className = "";
+ } catch (e) {}
+ }
+ }
+}
+</script>
+<style>
+:first-of-type { padding-block-start: 99% }
+</style>
+<mark id='a'>
+<embed src='#'>
+</html>
diff --git a/testing/crashtest/final/crashtests.list b/testing/crashtest/final/crashtests.list
new file mode 100644
index 0000000000..d56eb5a984
--- /dev/null
+++ b/testing/crashtest/final/crashtests.list
@@ -0,0 +1,8 @@
+# These are tests that open windows and don't close them after the test
+# finishes because there doesn't seem to be a way to close the windows. We run
+# them here after all other crashtests so that the left open windows don't
+# occlude the reftest window, and hence stop the compositor and refresh driver
+# ticks from happening.
+
+skip-if(geckoview) skip-if(geckoview&&isDebugBuild) skip-if(AddressSanitizer) skip-if(ThreadSanitizer) pref(dom.disable_open_during_load,false) load 1419902.html # skip Bug 1419902. Bug 1563013 for GV+WR. Bug 1524493 GV+debug. Bug 1573281 asan # this comes from dom/base/crashtests/
+skip-if(Android) load 1758199-1.html # printPreview doesn't work on android # this comes from layout/printing/crashtests