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

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

Issue 2469883002: Add test for ash devtools DOM agent getDocument method (Closed)
Patch Set: Remove unnecessary code 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
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 402125e81da9284619f6d39ad5b8ddd4ed171aef..ebb928589c6de9927ce987adebbb71e9e501abf2 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) {

Powered by Google App Engine
This is Rietveld 408576698