Truly independent web browser
test-web: Avoid symlinking for the manual test-web ordering tests
Zaggy1024f2cf19ac1c43
diff --git a/Tests/LibWeb/test-web/test-history-rate-limit-reset.py b/Tests/LibWeb/test-web/test-history-rate-limit-reset.pyindex 7c0db0b4e0f..f073af3a5e7 100644--- a/Tests/LibWeb/test-web/test-history-rate-limit-reset.py+++ b/Tests/LibWeb/test-web/test-history-rate-limit-reset.py@@ -29,8 +29,9 @@ def main():(root / directory / kind).mkdir(parents=True)(root / "Crash").mkdir()(root / "TestConfig.ini").write_text("")- (root / "Fixtures").symlink_to(source / "Tests/LibWeb/Fixtures", target_is_directory=True)- (root / "test-web").symlink_to(source / "Tests/LibWeb/test-web", target_is_directory=True)+ for file in ("Fixtures/http-test-server.py", "test-web/results-index.html"):+ (root / file).parent.mkdir()+ shutil.copyfile(source / "Tests/LibWeb" / file, root / file)(root / "Text/input/wpt-import").mkdir()shutil.copyfile(source / "Tests/LibWeb/Text/input/include.js", root / "Text/input/include.js")# More history updates than a navigable may make in one rate-limit window.@@ -41,7 +42,8 @@ def main():'println("flooded"); done();'"});</script>")- (root / "Text/expected/flood.txt").write_text("flooded\n")+ with (root / "Text/expected/flood.txt").open("w", newline="\n") as file:+ file.write("flooded\n")# Text tests precede reference tests. At -j1 these two files use the same view, without relying on directory# order. The page turns green only if its own history update goes through.(root / "Ref/input/consumer.html").write_text(diff --git a/Tests/LibWeb/test-web/test-manual-rendering-reset.py b/Tests/LibWeb/test-web/test-manual-rendering-reset.pyindex 0775bac2b9d..a8008ac3dde 100644--- a/Tests/LibWeb/test-web/test-manual-rendering-reset.py+++ b/Tests/LibWeb/test-web/test-manual-rendering-reset.py@@ -22,8 +22,9 @@ def run_case(binary, source, root, name, manual, timeout):(root / directory / kind).mkdir(parents=True)(root / "Crash").mkdir()(root / "TestConfig.ini").write_text("")- (root / "Fixtures").symlink_to(source / "Tests/LibWeb/Fixtures", target_is_directory=True)- (root / "test-web").symlink_to(source / "Tests/LibWeb/test-web", target_is_directory=True)+ for file in ("Fixtures/http-test-server.py", "test-web/results-index.html"):+ (root / file).parent.mkdir()+ shutil.copyfile(source / "Tests/LibWeb" / file, root / file)(root / "Text/input/wpt-import").mkdir()shutil.copyfile(source / "Tests/LibWeb/Text/input/include.js", root / "Text/input/include.js")finish = "internals.setTestTimeout(100);" if timeout else 'println("armed"); done();'@@ -33,7 +34,8 @@ def run_case(binary, source, root, name, manual, timeout):f"internals.setManualRenderingOpportunities({str(manual).lower()}); {finish}""});</script>")- (root / "Text/expected/poison.txt").write_text("" if timeout else "armed\n")+ with (root / "Text/expected/poison.txt").open("w", newline="\n") as file:+ file.write("" if timeout else "armed\n")# Text tests precede reference tests. At -j1 these two files use the same view, without relying on directory order.(root / "Ref/input/consumer.html").write_text('<!doctype html><html class="reftest-wait">'