diff --git a/test/inspector/runtime/remote-object-expected.txt b/test/inspector/runtime/remote-object-expected.txt index 040c567cd5..765f8e26ef 100644 --- a/test/inspector/runtime/remote-object-expected.txt +++ b/test/inspector/runtime/remote-object-expected.txt @@ -484,6 +484,16 @@ Running test: testRegExp type : object } } +'/w+/v', returnByValue: false, generatePreview: false +{ + result : { + className : RegExp + description : /w+/v + objectId : + subtype : regexp + type : object + } +} '/w+/dgimsuy', returnByValue: false, generatePreview: false { result : { @@ -494,6 +504,16 @@ Running test: testRegExp type : object } } +'/w+/dgimsvy', returnByValue: false, generatePreview: false +{ + result : { + className : RegExp + description : /w+/dgimsvy + objectId : + subtype : regexp + type : object + } +} 'new RegExp('\w+', 'g')', returnByValue: false, generatePreview: false { result : { @@ -526,6 +546,18 @@ Running test: testRegExp type : object } } +'var re = /./dgimsvy; + re.toString = () => 'foo'; + re', returnByValue: false, generatePreview: false +{ + result : { + className : RegExp + description : /./dgimsvy + objectId : + subtype : regexp + type : object + } +} 'var re = new RegExp('\w+', 'g'); re.prop = 32; re', returnByValue: false, generatePreview: true diff --git a/test/inspector/runtime/remote-object.js b/test/inspector/runtime/remote-object.js index d50d7aa0a5..ed4e764e43 100644 --- a/test/inspector/runtime/remote-object.js +++ b/test/inspector/runtime/remote-object.js @@ -234,9 +234,15 @@ InspectorTest.runAsyncTestSuite([ InspectorTest.logMessage((await evaluate({ expression: '/\w+/y' })).result); + InspectorTest.logMessage((await evaluate({ + expression: '/\w+/v' + })).result); InspectorTest.logMessage((await evaluate({ expression: '/\w+/dgimsuy' })).result); + InspectorTest.logMessage((await evaluate({ + expression: '/\w+/dgimsvy' + })).result); InspectorTest.logMessage((await evaluate({ expression: `new RegExp('\\w+', 'g')`, })).result); @@ -248,6 +254,11 @@ InspectorTest.runAsyncTestSuite([ re.toString = () => 'foo'; re` })).result); + InspectorTest.logMessage((await evaluate({ + expression: `var re = /./dgimsvy; + re.toString = () => 'foo'; + re` + })).result); InspectorTest.logMessage((await evaluate({ expression: `var re = new RegExp('\\w+', 'g'); re.prop = 32;