browser_container_tab.js (740B)
1 /* Any copyright is dedicated to the Public Domain. 2 http://creativecommons.org/publicdomain/zero/1.0/ */ 3 4 "use strict"; 5 6 // Verify RDM opens for a container tab. 7 8 const TEST_URL = "https://example.com/"; 9 10 addRDMTask( 11 null, 12 async function () { 13 // Open a tab with about:newtab in a container. 14 const tab = await addTab(BROWSER_NEW_TAB_URL, { 15 userContextId: 2, 16 }); 17 is(tab.userContextId, 2, "Tab's container ID is correct"); 18 19 // Open RDM and try to navigate 20 const { ui } = await openRDM(tab); 21 await waitForDeviceAndViewportState(ui); 22 23 await navigateTo(TEST_URL); 24 ok(true, "Test URL navigated successfully"); 25 26 await closeRDM(tab); 27 await removeTab(tab); 28 }, 29 { onlyPrefAndTask: true } 30 );