Chromium Code Reviews| 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..5f4924ff5dffe9726a7cf6b8ade249c048fa838f 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; |
|
Peter.Rybin
2013/07/10 23:33:58
Unused variable.
|
| - |
| function gotModifiedLayerTree(result) |
| { |
| dumpLayers(result.layers); |
| @@ -174,6 +172,15 @@ function test() |
| test.callback(messageObject.result); |
| }); |
| }; |
| + |
| + // Makes next step to wait half a second to let backend do its asynchronous processing. |
|
Peter.Rybin
2013/07/10 23:33:58
Backend updates layers by timer, that provokes som
|
| + function makeDeferredCallback(callback) |
| + { |
| + return function(result) |
| + { |
| + setTimeout(callback.bind(this, result), 500); |
| + }; |
| + } |
| function assert(name, actual, expected) |
| { |