Index: test/debugger/debug/debug-evaluate-no-side-effect-builtins.js |
diff --git a/test/debugger/debug/debug-evaluate-no-side-effect-builtins.js b/test/debugger/debug/debug-evaluate-no-side-effect-builtins.js |
index da9544ccdf271168a41907dbf60660818c548249..83bda7e7534fc383cf2e5b038cd0f200a785e8c0 100644 |
--- a/test/debugger/debug/debug-evaluate-no-side-effect-builtins.js |
+++ b/test/debugger/debug/debug-evaluate-no-side-effect-builtins.js |
@@ -109,10 +109,14 @@ function listener(event, exec_state, event_data, data) { |
for (f of Object.getOwnPropertyNames(String.prototype)) { |
if (typeof String.prototype[f] === "function") { |
// Do not expect locale-specific or regexp-related functions to work. |
- // {Lower,Upper}Case (Locale-specific or not) do not work either. |
+ // {Lower,Upper}Case (Locale-specific or not) do not work either |
+ // if Intl is enabled. |
if (f.indexOf("locale") >= 0) continue; |
- if (f.indexOf("Lower") >= 0) continue; |
- if (f.indexOf("Upper") >= 0) continue; |
+ if (f.indexOf("Locale") >= 0) continue; |
+ if (typeof Intl !== 'undefined') { |
+ if (f == "toUpperCase") continue; |
+ if (f == "toLowerCase") continue; |
+ } |
if (f == "normalize") continue; |
if (f == "match") continue; |
if (f == "search") continue; |
@@ -123,10 +127,12 @@ function listener(event, exec_state, event_data, data) { |
success("abcd"[f](2), `"abcd".${f}(2);`); |
} |
} |
- fail("'abCd'.toLowerCase()"); |
- fail("'abcd'.toUpperCase()"); |
fail("'abCd'.toLocaleLowerCase()"); |
fail("'abcd'.toLocaleUpperCase()"); |
+ if (typeof Intl !== 'undefined') { |
+ fail("'abCd'.toLowerCase()"); |
+ fail("'abcd'.toUpperCase()"); |
+ } |
fail("'abcd'.match(/a/)"); |
fail("'abcd'.replace(/a/)"); |
fail("'abcd'.search(/a/)"); |