blob: ac9fde1181dcb40c9150c1078b18ab81c1ac7948 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../http/tests/inspector/resources/inspector-test.js"></script>
<script>
function test()
{
let fakeObject = WI.RemoteObject.createFakeRemoteObject();
InspectorTest.assert(fakeObject instanceof WI.RemoteObject);
InspectorTest.assert(fakeObject.objectId === WI.RemoteObject.FakeRemoteObjectId);
InspectorTest.expectThat(fakeObject.type === "object" && !fakeObject.subtype, "A fake remote object should have object type.");
InspectorTest.expectThat(fakeObject !== WI.RemoteObject.createFakeRemoteObject(), "Each fake remote object instance should be unique.");
const options = {
ownProperties: true,
};
fakeObject.getPropertyDescriptors((properties) => {
InspectorTest.expectThat(Array.isArray(properties) && !properties.length, "A fake remote object should have an empty list of own properties.");
}, options);
fakeObject.getDisplayablePropertyDescriptors(function(properties) {
InspectorTest.expectThat(Array.isArray(properties) && !properties.length, "A fake remote object should have an empty list of displayable properties.");
InspectorTest.completeTest();
});
}
</script>
</head>
<body onload="runTest()">
</body>
</html>