addWindow-startOn.window.js (654B)
1 // META: title=RemoteContextHelper addWindow target 2 // META: script=/common/dispatcher/dispatcher.js 3 // META: script=/common/get-host-info.sub.js 4 // META: script=/common/utils.js 5 // META: script=/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js 6 // META: script=./resources/test-helper.js 7 8 'use strict'; 9 10 promise_test(async t => { 11 const rcHelper = new RemoteContextHelper(); 12 const main = await rcHelper.addWindow({startOn: 'pageshow'}); 13 await assertSimplestScriptRuns(main); 14 await assert_equals( 15 await main.executeScript(() => { 16 return executorStartEvent.type; 17 }), 18 'pageshow'); 19 });