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

Unified Diff: components/mus/public/cpp/tests/window_tree_client_unittest.cc

Issue 2029743002: Check WindowTreeClient for empty inflight queue upon teardown (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More tests Created 4 years, 6 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: components/mus/public/cpp/tests/window_tree_client_unittest.cc
diff --git a/components/mus/public/cpp/tests/window_tree_client_unittest.cc b/components/mus/public/cpp/tests/window_tree_client_unittest.cc
index 785e766d1f623d39f2c49d3ed409ad9c98a7ed7d..5ec9eaa5bc744add5218843a8816e1c30aa19025 100644
--- a/components/mus/public/cpp/tests/window_tree_client_unittest.cc
+++ b/components/mus/public/cpp/tests/window_tree_client_unittest.cc
@@ -1037,6 +1037,9 @@ TEST_F(WindowTreeClientTest, WindowDestroyedWhileTransientChildHasCapture) {
// parent. That will destroy both windows, and should reset the capture window
// correctly.
transient_child->SetCapture();
+ uint32_t change_id1;
+ ASSERT_TRUE(setup.window_tree()->GetAndClearChangeId(&change_id1));
+ setup.window_tree_client()->OnChangeCompleted(change_id1, true);
sadrul 2016/06/15 06:42:46 I think this adds burden to individual tests that
jonross 2016/06/15 14:03:07 An alternate modification I considered was changin
transient_parent->Destroy();
EXPECT_TRUE(tracker.windows().empty());
@@ -1045,6 +1048,9 @@ TEST_F(WindowTreeClientTest, WindowDestroyedWhileTransientChildHasCapture) {
child->SetVisible(true);
root->AddChild(child);
child->SetCapture();
+ uint32_t change_id2;
+ ASSERT_TRUE(setup.window_tree()->GetAndClearChangeId(&change_id2));
+ setup.window_tree_client()->OnChangeCompleted(change_id2, true);
EXPECT_TRUE(child->HasCapture());
}

Powered by Google App Engine
This is Rietveld 408576698