diff --git a/tooling/test/testcases/js/variable_second.js b/tooling/test/testcases/js/variable_second.js index fc16c3a937a8da011f4b852b57f7facd0835f302..c128bd1ae2004a0b6a2540eaee8d798180e97b47 100644 --- a/tooling/test/testcases/js/variable_second.js +++ b/tooling/test/testcases/js/variable_second.js @@ -105,6 +105,17 @@ var o = { var weakMap = new WeakMap(); var weakSet = new WeakSet(); + var proxy0 = new Proxy(obj0, {}); + var proxy1 = new Proxy(map0, {}); + var proxy2 = new Proxy(set0, {}); + var proxy3 = new Proxy(array0, {}); + var proxy4 = new Proxy(dataview0, {}); + var proxy5 = new Proxy(arraybuffer0, {}); + var proxy6 = new Proxy(weakref0, {}); + var proxy7 = new Proxy(sharedarraybuffer0, {}); + var proxy8 = new Proxy(weakMap, {}); + var proxy9 = new Proxy(weakSet, {}); + var nop = undefined; } } diff --git a/tooling/test/testcases/js_variable_second_test.h b/tooling/test/testcases/js_variable_second_test.h index 1f7170b6ce003fa47abb12eb563393c8a523d60c..7d4beefb5f808b888562f8ca62e8d555c427b439 100644 --- a/tooling/test/testcases/js_variable_second_test.h +++ b/tooling/test/testcases/js_variable_second_test.h @@ -36,8 +36,8 @@ public: std::string panfaFile = DEBUGGER_ABC_DIR "variable_second.abc"; std::string sourceFile = DEBUGGER_JS_DIR "variable_second.js"; static_cast(channel_)->Initial(vm_, runtime_); - // 107: breakpointer line - location_ = TestUtil::GetLocation(sourceFile.c_str(), 107, 0, panfaFile.c_str()); + // 118: breakpointer line + location_ = TestUtil::GetLocation(sourceFile.c_str(), 118, 0, panfaFile.c_str()); ASSERT_TRUE(location_.GetMethodId().IsValid()); TestUtil::SuspendUntilContinue(DebugEvent::LOAD_MODULE); ASSERT_EQ(moduleName, panfaFile); @@ -128,7 +128,8 @@ private: auto value = property->GetValue(); std::vector infos; PushValueInfo(value, infos); - if (value->GetType() == RemoteObject::TypeName::Object) { + if (value->GetType() == RemoteObject::TypeName::Object && (!value->HasSubType() || + value->GetSubType() != RemoteObject::SubTypeName::Proxy)) { std::vector> outPropertyDescInner; ASSERT_TRUE(value->HasObjectId()); params.SetObjectId(value->GetObjectId()).SetOwnProperties(true); @@ -370,6 +371,16 @@ private: { "iterator19", { "undefined" } }, { "weakMap", { "object", "weakmap", "Weakmap", "WeakMap", "[object WeakMap]", "none" } }, { "weakSet", { "object", "weakset", "Weakset", "WeakSet", "[object WeakSet]", "none" } }, + { "proxy0", { "object", "proxy", "Object", "Proxy", "[object Object]" }}, + { "proxy1", { "object", "proxy", "Object", "Proxy", "[object Map]" }}, + { "proxy2", { "object", "proxy", "Object", "Proxy", "[object Set]" }}, + { "proxy3", { "object", "proxy", "Object", "Proxy", "Apple,Banana" }}, + { "proxy4", { "object", "proxy", "Object", "Proxy", "[object DataView]" }}, + { "proxy5", { "object", "proxy", "Object", "Proxy", "[object ArrayBuffer]" }}, + { "proxy6", { "object", "proxy", "Object", "Proxy", "[object WeakRef]" }}, + { "proxy7", { "object", "proxy", "Object", "Proxy", "[object SharedArrayBuffer]" }}, + { "proxy8", { "object", "proxy", "Object", "Proxy", "[object WeakMap]" }}, + { "proxy9", { "object", "proxy", "Object", "Proxy", "[object WeakSet]" }}, }; int32_t index_ {0};