Skip to content
Permalink
Browse files
inspector/heap/getRemoteObject.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=156077
<rdar://problem/25469998>

Reviewed by Darin Adler.

Instead of blindly assuming that the first object is the `window` global object, iterate all
the objects found by `WI.HeapSnapshotProxy.prototype.instancesWithClassName` and check that
we see at least one `window` global object.

* inspector/heap/getRemoteObject.html:
* inspector/heap/getRemoteObject-expected.txt:
* platform/mac-wk2/TestExpectations:


Canonical link: https://commits.webkit.org/219572@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254835 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
dcrousso committed Jan 20, 2020
1 parent fada331 commit 3f66c6f014202a0b600bd39b62ffd9c995c8bc23
Showing 4 changed files with 33 additions and 12 deletions.
@@ -1,3 +1,19 @@
2020-01-20 Devin Rousso <drousso@apple.com>

inspector/heap/getRemoteObject.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=156077
<rdar://problem/25469998>

Reviewed by Darin Adler.

Instead of blindly assuming that the first object is the `window` global object, iterate all
the objects found by `WI.HeapSnapshotProxy.prototype.instancesWithClassName` and check that
we see at least one `window` global object.

* inspector/heap/getRemoteObject.html:
* inspector/heap/getRemoteObject-expected.txt:
* platform/mac-wk2/TestExpectations:

2020-01-20 Devin Rousso <drousso@apple.com>

REGRESSION (r250655?): [ Mac Debug ] inspector/runtime/promise-native-getter.html is a flaky timeout
@@ -9,8 +9,6 @@ PASS: No heap snapshot
-- Running test case: GetRemoteObjectForWindow
PASS: Should not have an error creating a snapshot.
PASS: Should should include at least one 'Window' instance.
PASS: Should not have an error getting remote object.
Window

-- Running test case: GetRemoteObjectBadIdentifier
PASS: Should not have an error creating a snapshot.
@@ -36,16 +36,25 @@
let workerProxy = WI.HeapSnapshotWorkerProxy.singleton();
workerProxy.createSnapshot(snapshotStringData, ({objectId, snapshot: serializedSnapshot}) => {
let snapshot = WI.HeapSnapshotProxy.deserialize(objectId, serializedSnapshot);
snapshot.instancesWithClassName("Window", (windows) => {
let heapSnapshotNode = windows[0];
InspectorTest.expectThat(heapSnapshotNode, "Should should include at least one 'Window' instance.");
snapshot.instancesWithClassName("Window", (windowHeapSnapshotNodes) => {
if (!windowHeapSnapshotNodes.length) {
reject("Should should include at least one 'Window' instance.");
return;
}

HeapAgent.getRemoteObject(heapSnapshotNode.id, "test", (error, remoteObjectPayload) => {
InspectorTest.expectThat(!error, "Should not have an error getting remote object.");
let remoteObject = WI.RemoteObject.fromPayload(remoteObjectPayload);
InspectorTest.log(remoteObject.description);
Promise.all(windowHeapSnapshotNodes.map((windowHeapSnapshotNode) => HeapAgent.getRemoteObject(windowHeapSnapshotNode.id, "test")))
.then((remoteObjectPayloads) => {
let sawWindowGlobalObject = false;

for (let {result} of remoteObjectPayloads) {
let remoteObject = WI.RemoteObject.fromPayload(result);
if (remoteObject.type === "object" && remoteObject.description === "Window")
sawWindowGlobalObject = true;
}

InspectorTest.expectTrue(sawWindowGlobalObject, "Should should include at least one 'Window' instance.");
resolve();
});
}, reject);
});
});
});
@@ -364,8 +364,6 @@ webkit.org/b/151709 [ Release ] http/tests/xmlhttprequest/workers/methods.html [

webkit.org/b/155312 inspector/heap/getPreview.html [ Pass Timeout ]

webkit.org/b/156077 inspector/heap/getRemoteObject.html [ Skip ]

# Video fullscreen is not implemented for mac wk2 in webkittestrunner
media/media-fullscreen-loop-inline.html [ Skip ]
media/media-fullscreen-pause-inline.html [ Skip ]

0 comments on commit 3f66c6f

Please sign in to comment.