also looking at this
fix(webview): recover from renderer crashes, and stop dropping window.open()
#72
4 files
+729
-23
| @@ -640,6 +640,27 @@ pub fn build(b: *std.Build) void { | ||
| 640 | 640 | }), |
| 641 | 641 | }); |
| 642 | 642 | |
| 643 | // Where a link that asks for a new window is allowed to go. Pure policy, | |
| 644 | // so the whole drop list is provable without a browser. | |
| 645 | const external_link_tests = b.addTest(.{ | |
| 646 | .root_module = b.createModule(.{ | |
| 647 | .root_source_file = b.path("src/external_link.zig"), | |
| 648 | .target = target, | |
| 649 | .optimize = optimize, | |
| 650 | }), | |
| 651 | }); | |
| 652 | ||
| 653 | // The reload budget that brings a window back after WebKit's content | |
| 654 | // process dies. Pure, and takes its clock as an argument, so a crash loop | |
| 655 | // is testable without crashing anything. | |
| 656 | const webview_recovery_tests = b.addTest(.{ | |
| 657 | .root_module = b.createModule(.{ | |
| 658 | .root_source_file = b.path("src/webview_recovery.zig"), | |
| 659 | .target = target, | |
| 660 | .optimize = optimize, | |
| 661 | }), | |
| 662 | }); | |
| 663 | ||
| 643 | 664 | // The conformance test: what craft declares, against what it dispatches. |
| 644 | 665 | const capability_conformance_tests = b.addTest(.{ |
| 645 | 666 | .root_module = b.createModule(.{ |
| @@ -1010,6 +1031,8 @@ pub fn build(b: *std.Build) void { | ||
| 1010 | 1031 | const run_local_tls_tests = b.addRunArtifact(local_tls_tests); |
| 1011 | 1032 | const run_menu_roles_tests = b.addRunArtifact(menu_roles_tests); |
| 1012 | 1033 | const run_capabilities_tests = b.addRunArtifact(capabilities_tests); |
| 1034 | const run_external_link_tests = b.addRunArtifact(external_link_tests); | |
| 1035 | const run_webview_recovery_tests = b.addRunArtifact(webview_recovery_tests); | |
| 1013 | 1036 | const run_prefs_tests = b.addRunArtifact(prefs_tests); |
| 1014 | 1037 | const run_prefs_macos_tests = b.addRunArtifact(prefs_macos_tests); |
| 1015 | 1038 | const run_key_codes_tests = b.addRunArtifact(key_codes_tests); |
| @@ -1123,6 +1146,8 @@ pub fn build(b: *std.Build) void { | ||
| 1123 | 1146 | test_step.dependOn(&run_local_tls_tests.step); |
| 1124 | 1147 | test_step.dependOn(&run_menu_roles_tests.step); |
| 1125 | 1148 | test_step.dependOn(&run_capabilities_tests.step); |
| 1149 | test_step.dependOn(&run_external_link_tests.step); | |
| 1150 | test_step.dependOn(&run_webview_recovery_tests.step); | |
| 1126 | 1151 | // macOS only: the registry describes the dispatch chain in macos.zig, and |
| 1127 | 1152 | // compiling it elsewhere drags the whole native graph into a test binary |
| 1128 | 1153 | // for a platform it does not describe. |