Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions gulp/constants/functional-test-globs.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const MULTIPLE_WINDOWS_TESTS_GLOB = 'test/functional/fixtures/multiple-windows/test.js';
const ISOLATED_SESSIONS_TESTS_GLOB = 'test/functional/fixtures/isolated-sessions/test.js';
const HEADED_CHROME_FIREFOX_TESTS_GLOB = ['test/functional/fixtures/live/test.js', 'test/functional/fixtures/ui/test.js'];
const COMPILER_SERVICE_TESTS_GLOB = 'test/functional/fixtures/compiler-service/test.js';
const LEGACY_TESTS_GLOB = 'test/functional/legacy-fixtures/**/test.js';
Expand All @@ -12,13 +13,15 @@ const SCREENSHOT_TESTS_GLOB = [
const TESTS_GLOB = [
BASIC_TESTS_GLOB,
`!${MULTIPLE_WINDOWS_TESTS_GLOB}`,
`!${ISOLATED_SESSIONS_TESTS_GLOB}`,
`!${COMPILER_SERVICE_TESTS_GLOB}`,
];

module.exports = {
TESTS_GLOB,
LEGACY_TESTS_GLOB,
MULTIPLE_WINDOWS_TESTS_GLOB,
ISOLATED_SESSIONS_TESTS_GLOB,
BASIC_TESTS_GLOB,
COMPILER_SERVICE_TESTS_GLOB,
SCREENSHOT_TESTS_GLOB,
Expand Down
17 changes: 17 additions & 0 deletions src/api/test-controller/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,23 @@ export default class TestController {
[delegatedAPI(ReportCommand.methodName)] (...args) {
return this.enqueueCommand(ReportCommand, { args });
}

// Open an isolated browser session via CDP Target.createBrowserContext
_openIsolatedSession$ () {
const callsite = getCallsiteForMethod('openIsolatedSession');

return this._enqueueTask('openIsolatedSession', () => {
return async () => {
if (!this.testRun.isNativeAutomation)
throw new Error('openIsolatedSession requires Native Automation mode');

const isolatedSession = await this.testRun.createIsolatedSession();

return isolatedSession.controller;
};
}, callsite);
}

shouldStop (command) {
// NOTE: should always stop on Debug command
return command === 'debug';
Expand Down
Loading
Loading