Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(425)

Unified Diff: third_party/WebKit/LayoutTests/inspector-protocol/css/css-getLayoutTreeNodes.html

Issue 2882193002: [devtools] Add DOMSnapshot domain for dom+layout+style snapshots. (Closed)
Patch Set: add domain to schema agent Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/inspector-protocol/css/css-getLayoutTreeNodes.html
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-getLayoutTreeNodes.html b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-getLayoutTreeNodes.html
index 43ea5445abe3b8cf023e430d89d0c2fe6b3333ab..21348521e9f9631e0da2486323c901e0f4587256 100644
--- a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-getLayoutTreeNodes.html
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-getLayoutTreeNodes.html
@@ -22,26 +22,9 @@ function test()
function onLayoutTreeNodes(response)
{
InspectorTest.log("\nLayoutTreeNodes result:");
- canonicalizeBackendNodeIds(response);
InspectorTest.log(JSON.stringify(response, null, 2));
InspectorTest.completeTest();
}
-
- // While unique the backendNodeId IDs are not stable cross platform, so we canonicalize them.
- var nextId = 1;
- var nodeMap = {};
- function canonicalizeBackendNodeIds(node) {
- if (node.hasOwnProperty('backendNodeId')) {
- if (!nodeMap.hasOwnProperty(node.backendNodeId)) {
- nodeMap[node.backendNodeId] = nextId++;
- }
- node.backendNodeId = nodeMap[node.backendNodeId];
- }
- for (var property in node) {
- if (!node.hasOwnProperty(property) || typeof node[property] === 'object')
- canonicalizeBackendNodeIds(node[property]);
- }
- }
}
</script>

Powered by Google App Engine
This is Rietveld 408576698