3 <script src=
"../../http/tests/inspector/inspector-test.js"></script>
6 var object1
= { foo
: 1 };
7 var symbol1
= Symbol("a");
10 function dumpSymbolProperty(label
)
12 console
.log("===== " + label
+ " =====");
13 console
.log(object1
[symbol1
]);
21 InspectorTest
.runTestSuite([
22 function testSetUp(next
)
24 InspectorTest
.evaluateInPage("dumpSymbolProperty('Initial')", step0
);
28 InspectorTest
.RuntimeAgent
.evaluate("object1", step1
);
31 function step1(error
, result
, wasThrown
)
33 obj1
= InspectorTest
.runtimeModel
.createRemoteObject(result
);
34 InspectorTest
.RuntimeAgent
.evaluate("symbol1", step2
);
37 function step2(error
, result
, wasThrown
)
39 name
= WebInspector
.RemoteObject
.toCallArgument(InspectorTest
.runtimeModel
.createRemoteObject(result
));
44 function testSetSymbolPropertyValue(next
)
46 obj1
.setPropertyValue(name
, "3", step1
);
50 InspectorTest
.evaluateInPage("dumpSymbolProperty('Set property')", next
);
54 function testDeleteSymbolProperty(next
)
56 obj1
.deleteProperty(name
, step1
);
60 InspectorTest
.evaluateInPage("dumpSymbolProperty('Delete property')", next
);
69 <body onload=
"runTest()">
71 Tests editing Symbol properties.