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

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

Issue 2498593002: Revert of Fix bug where removed (but not deleted) windows are not reflected in the tree properly (Closed)
Patch Set: 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.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/devtools/ash_devtools_unittest.cc
diff --git a/ash/common/devtools/ash_devtools_unittest.cc b/ash/common/devtools/ash_devtools_unittest.cc
index 2bbcacd02aca8105ab80b3e38f491a69974ee184..1a79c07dc2cf5032503b3a7dfaf9103bde2a898a 100644
--- a/ash/common/devtools/ash_devtools_unittest.cc
+++ b/ash/common/devtools/ash_devtools_unittest.cc
@@ -225,7 +225,7 @@
ExpectChildNodeRemoved(parent_node->getNodeId(), child_node->getNodeId());
}
-TEST_F(AshDevToolsTest, WindowReorganizedChildNodeRearranged) {
+TEST_F(AshDevToolsTest, WindowReorganizedChildNodeRemovedAndInserted) {
// Initialize DOMAgent
std::unique_ptr<ui::devtools::protocol::DOM::Node> root;
dom_agent()->getDocument(&root);
@@ -249,31 +249,6 @@
ExpectChildNodeInserted(target_node->getNodeId(), sibling_node->getNodeId());
}
-TEST_F(AshDevToolsTest, WindowReorganizedChildNodeRemovedAndInserted) {
- // Initialize DOMAgent
- std::unique_ptr<ui::devtools::protocol::DOM::Node> root;
- dom_agent()->getDocument(&root);
-
- WmWindow* root_window = WmShell::Get()->GetPrimaryRootWindow();
- WmWindow* target_window = root_window->GetChildren()[1];
- WmWindow* child_window = root_window->GetChildren()[0]->GetChildren()[0];
-
- DOM::Node* root_node = root->getChildren(nullptr)->get(0);
- DOM::Node* parent_node = root_node->getChildren(nullptr)->get(0);
- DOM::Node* target_node = root_node->getChildren(nullptr)->get(1);
- Array<DOM::Node>* target_node_children = target_node->getChildren(nullptr);
- DOM::Node* sibling_node =
- target_node_children->get(target_node_children->length() - 1);
- DOM::Node* child_node = parent_node->getChildren(nullptr)->get(0);
-
- Compare(target_window, target_node);
- Compare(child_window, child_node);
- child_window->GetParent()->RemoveChild(child_window);
- target_window->AddChild(child_window);
- ExpectChildNodeRemoved(parent_node->getNodeId(), child_node->getNodeId());
- ExpectChildNodeInserted(target_node->getNodeId(), sibling_node->getNodeId());
-}
-
TEST_F(AshDevToolsTest, WindowStackingChangedChildNodeRemovedAndInserted) {
// Initialize DOMAgent
std::unique_ptr<ui::devtools::protocol::DOM::Node> root;
« no previous file with comments | « ash/common/devtools/ash_devtools_dom_agent.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698