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

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

Issue 2772853003: [debug] extend debug-evaluate by Map builtins. (Closed)
Patch Set: 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
« src/debug/debug-evaluate.cc ('K') | « src/debug/debug-evaluate.cc ('k') | 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-2.js
diff --git a/test/debugger/debug/debug-evaluate-no-side-effect-builtins-2.js b/test/debugger/debug/debug-evaluate-no-side-effect-builtins-2.js
index 188ee09293220eee677ec3797a30e1fac1a1e02b..2e82cf272904824a81ab5504880327277df74b44 100644
--- a/test/debugger/debug/debug-evaluate-no-side-effect-builtins-2.js
+++ b/test/debugger/debug/debug-evaluate-no-side-effect-builtins-2.js
@@ -8,6 +8,7 @@ Debug = debug.Debug
var exception = null;
var date = new Date();
+var map = new Map().set("a", "b").set("c", "d");
function listener(event, exec_state, event_data, data) {
if (event != Debug.DebugEvent.Break) return;
@@ -51,6 +52,23 @@ function listener(event, exec_state, event_data, data) {
success("abc", `encodeURIComponent("abc")`);
success("abc", `escape("abc")`);
success("abc", `unescape("abc")`);
+ success(true, `isFinite(0)`);
+ success(true, `isNaN(0/0)`);
+
+ // Test Map functions.
+ success(undefined, `new Map()`);
+ success("[object Map]", `map.toString()`);
+ success("b", `map.get("a")`);
+ success(true, `map.get("x") === undefined`);
+ success(undefined, `map.entries()`);
+ success(undefined, `map.keys()`);
+ success(undefined, `map.values()`);
+ success(2, `map.size`);
+ fail(`map.has("c")`); // This sets a hash on the object.
+ fail(`map.forEach(()=>1)`);
+ fail(`map.delete("a")`);
+ fail(`map.clear()`);
+ fail(`map.set("x", "y")`);
} catch (e) {
exception = e;
print(e, e.stack);
« src/debug/debug-evaluate.cc ('K') | « src/debug/debug-evaluate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698