[test][inspector] Add inspector test for RegExp v-flag
Bug: v8:11935 Change-Id: Idf667b07398f3a740cc210ed52769199e9622e38 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4219017 Commit-Queue: Mathias Bynens <mathias@chromium.org> Auto-Submit: Patrick Thier <pthier@chromium.org> Reviewed-by: Mathias Bynens <mathias@chromium.org> Cr-Commit-Position: refs/heads/main@{#85643}
This commit is contained in:
parent
49f1450b3f
commit
1885a16551
@ -484,6 +484,16 @@ Running test: testRegExp
|
||||
type : object
|
||||
}
|
||||
}
|
||||
'/w+/v', returnByValue: false, generatePreview: false
|
||||
{
|
||||
result : {
|
||||
className : RegExp
|
||||
description : /w+/v
|
||||
objectId : <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 : <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 : <objectId>
|
||||
subtype : regexp
|
||||
type : object
|
||||
}
|
||||
}
|
||||
'var re = new RegExp('\w+', 'g');
|
||||
re.prop = 32;
|
||||
re', returnByValue: false, generatePreview: true
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user