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

Unified Diff: test/debugger/test-api.js

Issue 2512963002: [debug-wrapper] Migrate more tests (Closed)
Patch Set: Rebase Created 4 years, 1 month 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 | « test/debugger/debugger.status ('k') | test/mjsunit/debug-conditional-breakpoints.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/debugger/test-api.js
diff --git a/test/debugger/test-api.js b/test/debugger/test-api.js
index f78b1171af005584399edd907a86d5682d543bd5..a9bcaf213af25d3147b463cf381741365f5fc7ca 100644
--- a/test/debugger/test-api.js
+++ b/test/debugger/test-api.js
@@ -518,6 +518,14 @@ class DebugWrapper {
return { value : () => localValue };
}
+ reconstructValue(objectId) {
+ const {msgid, msg} = this.createMessage(
+ "Runtime.getProperties", { objectId : objectId, ownProperties: true });
+ this.sendMessage(msg);
+ const reply = this.takeReplyChecked(msgid);
+ return Object(reply.result.internalProperties[0].value.value);
+ }
+
reconstructRemoteObject(obj) {
let value = obj.value;
let isUndefined = false;
@@ -553,7 +561,20 @@ class DebugWrapper {
break;
}
default: {
- value = this.propertiesToObject(this.getProperties(obj.objectId));
+ switch (obj.className) {
+ case "global":
+ value = Function('return this')();
+ break;
+ case "Number":
+ case "String":
+ case "Boolean":
+ value = this.reconstructValue(obj.objectId);
+ break;
+ default:
+ value = this.propertiesToObject(
+ this.getProperties(obj.objectId));
+ break;
+ }
break;
}
}
« no previous file with comments | « test/debugger/debugger.status ('k') | test/mjsunit/debug-conditional-breakpoints.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698