Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(310)

Unified Diff: test/debugger/debug/debug-evaluate-no-side-effect-builtins.js

Issue 2750403004: [intl] Fix debug-evaluate-no-side-effect-builtins test (Closed)
Patch Set: Fix test more Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/)");
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698