browser_frame_message_manager_cache.js (615B)
1 add_task(async function testCacheAfterInvalidate() { 2 // Load some page to make scripts cached. 3 let tab1 = await BrowserTestUtils.openNewForegroundTab( 4 gBrowser, 5 "about:addons" 6 ); 7 8 // Discard ScriptPreloader cache. 9 Services.obs.notifyObservers(null, "startupcache-invalidate"); 10 11 // Load some other page to use the cache in nsMessageManagerScriptExecutor 12 // cache. 13 let tab2 = await BrowserTestUtils.openNewForegroundTab( 14 gBrowser, 15 "about:preferences" 16 ); 17 18 // Verify the browser doesn't crash. 19 ok(true); 20 21 BrowserTestUtils.removeTab(tab1); 22 BrowserTestUtils.removeTab(tab2); 23 });