Commit eccae9b6 authored by Adithya Srinivasan's avatar Adithya Srinivasan Committed by Commit Bot

Portals: Add test for portals in devtools context selector

Follow up to https://crrev.com/c/2404384.

Bug: 1127046
Change-Id: I282557314ec24e505cd04fa2ad28976d99930740
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2414411Reviewed-by: default avatarPeter Marshall <petermarshall@chromium.org>
Commit-Queue: Adithya Srinivasan <adithyas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#807865}
parent 34214ec8
......@@ -4,6 +4,8 @@ Running: testMainConsole
!!window.portalHost = false
window.location.pathname = "/devtools/portals/resources/append-predecessor-host.html"
Running: testContextSelector
Running: testPortalConsole
!!window.portalHost = true
window.location.pathname = "/devtools/portals/resources/append-predecessor.html"
......
......@@ -28,6 +28,15 @@
next();
},
async function testContextSelector(next) {
const selector = Console.ConsoleView.instance()._consoleContextSelector;
TestRunner.assertEquals(selector._items.length, 2);
const executionContext = selector._items.at(1);
TestRunner.assertEquals(selector.titleFor(executionContext), 'append-predecessor.html');
TestRunner.assertEquals(selector._depthFor(executionContext), 1);
next();
},
async function testPortalConsole(next) {
await setContextLabel(targets[1], 'portal');
ConsoleTestRunner.changeExecutionContext('portal');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment