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