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

Unified Diff: ash/common/devtools/ash_devtools_dom_agent.cc

Issue 2469883002: Add test for ash devtools DOM agent getDocument method (Closed)
Patch Set: use new devtools style Created 4 years, 1 month 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
« no previous file with comments | « ash/common/devtools/ash_devtools_dom_agent.h ('k') | ash/common/devtools/ash_devtools_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/devtools/ash_devtools_dom_agent.cc
diff --git a/ash/common/devtools/ash_devtools_dom_agent.cc b/ash/common/devtools/ash_devtools_dom_agent.cc
index 8ae72bba5bf9cd4bd7b1528c8be21be96b52a473..366ab9b7e6855422cb13cb76165ba3b2d619839a 100644
--- a/ash/common/devtools/ash_devtools_dom_agent.cc
+++ b/ash/common/devtools/ash_devtools_dom_agent.cc
@@ -21,14 +21,15 @@ std::unique_ptr<DOM::Node> BuildNode(
std::unique_ptr<Array<DOM::Node>> children) {
static DOM::NodeId node_ids = 0;
constexpr int kDomElementNodeType = 1;
- return DOM::Node::create()
- .setNodeId(node_ids++)
- .setNodeName(name)
- .setNodeType(kDomElementNodeType)
- .setAttributes(std::move(attributes))
- .setChildNodeCount(children->length())
- .setChildren(std::move(children))
- .build();
+ std::unique_ptr<DOM::Node> node = DOM::Node::create()
+ .setNodeId(node_ids++)
+ .setNodeName(name)
+ .setNodeType(kDomElementNodeType)
+ .setAttributes(std::move(attributes))
+ .build();
+ node->setChildNodeCount(children->length());
+ node->setChildren(std::move(children));
+ return node;
}
std::unique_ptr<Array<std::string>> GetAttributes(const ash::WmWindow* window) {
« no previous file with comments | « ash/common/devtools/ash_devtools_dom_agent.h ('k') | ash/common/devtools/ash_devtools_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698