File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ export class Chromium implements BrowserType<CRBrowser> {
149
149
const userDataDirArg = args . find ( arg => arg . startsWith ( '--user-data-dir' ) ) ;
150
150
if ( userDataDirArg )
151
151
throw new Error ( 'Pass userDataDir parameter instead of specifying --user-data-dir argument' ) ;
152
- if ( args . find ( arg => arg . startsWith ( '--remote-debugging-' ) ) )
152
+ if ( args . find ( arg => arg . startsWith ( '--remote-debugging-pipe ' ) ) )
153
153
throw new Error ( 'Playwright manages remote debugging connection itself.' ) ;
154
154
if ( launchType !== 'persistent' && args . find ( arg => ! arg . startsWith ( '-' ) ) )
155
155
throw new Error ( 'Arguments can not specify page to be opened' ) ;
Original file line number Diff line number Diff line change @@ -26,11 +26,11 @@ describe('launcher', function() {
26
26
const error = await browserType . launchServer ( options ) . catch ( e => e ) ;
27
27
expect ( error . message ) . toContain ( 'Playwright manages remote debugging connection itself' ) ;
28
28
} ) ;
29
- it ( 'should throw with remote-debugging-port argument' , async ( { browserType, defaultBrowserOptions} ) => {
29
+ it ( 'should not throw with remote-debugging-port argument' , async ( { browserType, defaultBrowserOptions} ) => {
30
30
const options = Object . assign ( { } , defaultBrowserOptions ) ;
31
- options . args = [ '--remote-debugging-port=9222 ' ] . concat ( options . args || [ ] ) ;
32
- const error = await browserType . launchServer ( options ) . catch ( e => e ) ;
33
- expect ( error . message ) . toContain ( 'Playwright manages remote debugging connection itself' ) ;
31
+ options . args = [ '--remote-debugging-port=0 ' ] . concat ( options . args || [ ] ) ;
32
+ const browser = await browserType . launchServer ( options ) ;
33
+ await browser . close ( ) ;
34
34
} ) ;
35
35
it ( 'should open devtools when "devtools: true" option is given' , async ( { browserType, defaultBrowserOptions} ) => {
36
36
const browser = await browserType . launch ( Object . assign ( { devtools : true } , { ...defaultBrowserOptions , headless : false } ) ) ;
You can’t perform that action at this time.
0 commit comments