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

Unified Diff: ui/aura/mus/window_tree_client_unittest.cc

Issue 2468493002: Fix bug in keeping capture in sync during destruction (Closed)
Patch Set: feedback 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 | « ui/aura/mus/window_tree_client.cc ('k') | ui/aura/test/mus/window_tree_client_private.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/mus/window_tree_client_unittest.cc
diff --git a/ui/aura/mus/window_tree_client_unittest.cc b/ui/aura/mus/window_tree_client_unittest.cc
index 52e318cb4539890923c87e581ffe432be9304b60..b4b1a10ee047cbc54bae4f358e8d1903caba4a97 100644
--- a/ui/aura/mus/window_tree_client_unittest.cc
+++ b/ui/aura/mus/window_tree_client_unittest.cc
@@ -12,6 +12,7 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/client/capture_client.h"
+#include "ui/aura/client/capture_client_observer.h"
#include "ui/aura/client/focus_client.h"
#include "ui/aura/client/transient_window_client.h"
#include "ui/aura/mus/property_converter.h"
@@ -1070,9 +1071,10 @@ TEST_F(WindowTreeClientWmTest, OnWindowTreeCaptureChanged) {
// Deleting a window with capture should notify observers as well.
child1.reset();
- // Deletion implicitly releases focus.
- ASSERT_TRUE(window_tree()->AckSingleChangeOfType(
- WindowTreeChangeType::CAPTURE, true));
+ // No capture change is sent during deletion (the server side sees the window
+ // deletion too and resets internal state).
+ EXPECT_EQ(
+ 0u, window_tree()->GetChangeCountForType(WindowTreeChangeType::CAPTURE));
EXPECT_EQ(1, capture_recorder.capture_changed_count());
EXPECT_EQ(0, capture_recorder.last_gained_capture_window_id());
« no previous file with comments | « ui/aura/mus/window_tree_client.cc ('k') | ui/aura/test/mus/window_tree_client_private.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698