feat(launcher): add experimental "transport" option to pptr.connect (#3265)

This patch:
- adds experimental "transport" option to pptr.connect
- uses "transport" option to make sure Puppeteer-Web works with
  Target.exposeDevToolsProtocol

Drive-by: add `browser.target()` to access browser target.
This commit is contained in:
Andrey Lushnikov
2018-09-20 11:55:23 -07:00
committed by GitHub
parent 5acf953104
commit 4e48dfc7a1
7 changed files with 46 additions and 3 deletions

View File

@@ -37,6 +37,13 @@ module.exports.addTests = function({testRunner, expect, headless}) {
});
});
describe('Browser.target', function() {
it('should return browser target', async({browser}) => {
const target = browser.target();
expect(target.type()).toBe('browser');
});
});
describe('Browser.process', function() {
it('should return child_process instance', async function({browser}) {
const process = await browser.process();