client/tests/browser_network_timeout.c (905B)
1 #include "guest_memory.h" 2 #include "recomp_types.h" 3 #include <assert.h> 4 #include <stdio.h> 5 6 /* ScheduleTimer is the guest's exported connection/inactivity timer API. */ 7 void sub_2E00A130(void); 8 recomp_func_t recomp_lookup(uint32_t address) { assert(0); return NULL; } 9 recomp_func_t recomp_lookup_import(uint32_t address) { return recomp_lookup(address); } 10 recomp_func_t recomp_lookup_manual(uint32_t address) { return recomp_lookup(address); } 11 12 int main(void) 13 { 14 assert(guest_map("browser timeout test", 0x50000000, 0x10000)); 15 for (unsigned kind = 1; kind <= 2; ++kind) { 16 g_esp = 0x5000ff00; 17 MEM32(g_esp + 4) = kind; 18 MEM32(g_esp + 8) = 0; 19 MEM32(g_esp + 12) = 0; 20 21 sub_2E00A130(); 22 23 assert(g_eax == UINT32_MAX); 24 assert(g_esp == 0x5000ff10); 25 } 26 puts("PASS: browser transport owns timeout recovery without arming guest shutdown timers"); 27 }