diff --git a/docshell/test/navigation/frame_recursive_dynamic.html b/docshell/test/navigation/frame_recursive_dynamic.html new file mode 100644 index 00000000000000..8a9157f012f9a7 --- /dev/null +++ b/docshell/test/navigation/frame_recursive_dynamic.html @@ -0,0 +1,8 @@ + diff --git a/docshell/test/navigation/mochitest.toml b/docshell/test/navigation/mochitest.toml index 811ad7c89ddbb0..2176e4f82b5b64 100644 --- a/docshell/test/navigation/mochitest.toml +++ b/docshell/test/navigation/mochitest.toml @@ -86,6 +86,7 @@ support-files = [ "frame_5_out_of_6.html", "frame_6_out_of_6.html", "frame_recursive.html", + "frame_recursive_dynamic.html", "object_recursive_load.html", "file_nested_srcdoc.html", ] diff --git a/docshell/test/navigation/test_recursive_frames.html b/docshell/test/navigation/test_recursive_frames.html index 3ccc09dd14c4ea..60c135c00c9a9f 100644 --- a/docshell/test/navigation/test_recursive_frames.html +++ b/docshell/test/navigation/test_recursive_frames.html @@ -97,10 +97,20 @@ "about:srcdoc", ], }, + { // too many recursive dynamically created iframes + frameId: "dynamicrecursive", + expectedLocations: [ + // eslint-disable-next-line @microsoft/sdl/no-insecure-url + "http://example.com/tests/docshell/test/navigation/frame_recursive_dynamic.html", + // eslint-disable-next-line @microsoft/sdl/no-insecure-url + "http://example.com/tests/docshell/test/navigation/frame_recursive_dynamic.html", + "about:blank" + ], + }, ]; async function checkRecursiveLoad(level) { - let el = content.document.getElementById("static"); + let el = content.document.getElementById("static") || content.document.getElementById("dynamic"); let documentURI = await SpecialPowers.spawn( el, [], @@ -152,7 +162,6 @@ ); } }); -