browser_inspector_fission_switch_target.js (1301B)
1 /* Any copyright is dedicated to the Public Domain. 2 http://creativecommons.org/publicdomain/zero/1.0/ */ 3 "use strict"; 4 5 // Test target-switching with the inspector. 6 // This test should check both fission and non-fission target switching. 7 8 const PARENT_PROCESS_URI = "about:robots"; 9 const EXAMPLE_COM_URI = 10 "https://example.com/document-builder.sjs?html=<div id=com>com"; 11 const EXAMPLE_ORG_URI = 12 "https://example.org/document-builder.sjs?html=<div id=org>org"; 13 14 add_task(async function () { 15 const { inspector } = await openInspectorForURL(PARENT_PROCESS_URI); 16 const aboutRobotsNodeFront = await getNodeFront(".title-text", inspector); 17 ok(!!aboutRobotsNodeFront, "Can retrieve a node front from about:robots"); 18 19 info("Navigate to " + EXAMPLE_COM_URI); 20 await navigateTo(EXAMPLE_COM_URI); 21 const comNodeFront = await getNodeFront("#com", inspector); 22 ok(!!comNodeFront, "Can retrieve a node front from example.com"); 23 24 await navigateTo(EXAMPLE_ORG_URI); 25 const orgNodeFront = await getNodeFront("#org", inspector); 26 ok(!!orgNodeFront, "Can retrieve a node front from example.org"); 27 28 await navigateTo(PARENT_PROCESS_URI); 29 const aboutRobotsNodeFront2 = await getNodeFront(".title-text", inspector); 30 ok(!!aboutRobotsNodeFront2, "Can retrieve a node front from about:robots"); 31 });