| Index: LayoutTests/inspector-protocol/layers/layers-for-node.html
|
| diff --git a/LayoutTests/inspector-protocol/layers/layers-for-node.html b/LayoutTests/inspector-protocol/layers/layers-for-node.html
|
| index 8d579543b217895536a2b745e1d872ebbbc9dae5..2c2591ad5a61090661b98362be99f5b3a3170984 100644
|
| --- a/LayoutTests/inspector-protocol/layers/layers-for-node.html
|
| +++ b/LayoutTests/inspector-protocol/layers/layers-for-node.html
|
| @@ -39,7 +39,7 @@ function test()
|
| name: "Get the Document",
|
| command: "DOM.getDocument",
|
| parameters: {},
|
| - callback: getInitialLayerTree
|
| + callback: makeDeferredCallback(getInitialLayerTree)
|
| });
|
| };
|
|
|
| @@ -64,7 +64,7 @@ function test()
|
| name: "Message the page to add a new composited layer",
|
| command: "Runtime.evaluate",
|
| parameters: {"expression": "addCompositedLayer()"},
|
| - callback: getModifiedLayerTree
|
| + callback: makeDeferredCallback(getModifiedLayerTree)
|
| });
|
| };
|
|
|
| @@ -78,8 +78,6 @@ function test()
|
| });
|
| };
|
|
|
| - var layerCount = 0;
|
| -
|
| function gotModifiedLayerTree(result)
|
| {
|
| dumpLayers(result.layers);
|
| @@ -174,6 +172,16 @@ function test()
|
| test.callback(messageObject.result);
|
| });
|
| };
|
| +
|
| + // Makes next step deferred to let backend do its asynchronous processing and sending us all pending notifications.
|
| + // Scheduling on timer with no delay is enough deferring.
|
| + function makeDeferredCallback(callback)
|
| + {
|
| + return function(result)
|
| + {
|
| + setTimeout(callback.bind(this, result), 0);
|
| + };
|
| + }
|
|
|
| function assert(name, actual, expected)
|
| {
|
|
|