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

Unified Diff: mojo/services/public/cpp/view_manager/tests/view_manager_unittest.cc

Issue 415143004: Get rid of ViewManagerTransactions & pending queue. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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
« no previous file with comments | « mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/public/cpp/view_manager/tests/view_manager_unittest.cc
diff --git a/mojo/services/public/cpp/view_manager/tests/view_manager_unittest.cc b/mojo/services/public/cpp/view_manager/tests/view_manager_unittest.cc
index 01051b70f467850ea022b74ddc87ed3f685cace6..59968b5c813d355f87ed102621a1459fa7310b96 100644
--- a/mojo/services/public/cpp/view_manager/tests/view_manager_unittest.cc
+++ b/mojo/services/public/cpp/view_manager/tests/view_manager_unittest.cc
@@ -42,10 +42,10 @@ void QuitRunLoop() {
current_run_loop->Quit();
}
-void WaitForAllChangesToBeAcked(ViewManagerClientImpl* client) {
- client->set_changes_acked_callback(base::Bind(&QuitRunLoop));
+void WaitForChangeToBeAcked(ViewManagerClientImpl* client) {
+ client->set_change_acked_callback(base::Bind(&QuitRunLoop));
DoRunLoop();
- client->ClearChangesAckedCallback();
+ client->ClearChangeAckedCallback();
}
class ConnectServiceLoader : public ServiceLoader,
@@ -650,11 +650,15 @@ TEST_F(ViewManagerTest, MapSubtreeOnAttach) {
Node* child1 = Node::Create(window_manager());
Node* child11 = Node::Create(window_manager());
child1->AddChild(child11);
+ WaitForChangeToBeAcked(
+ static_cast<ViewManagerClientImpl*>(window_manager()));
gfx::Rect child11_bounds(800, 600);
child11->SetBounds(child11_bounds);
+ WaitForChangeToBeAcked(
+ static_cast<ViewManagerClientImpl*>(window_manager()));
View* view11 = View::Create(window_manager());
child11->SetActiveView(view11);
- WaitForAllChangesToBeAcked(
+ WaitForChangeToBeAcked(
static_cast<ViewManagerClientImpl*>(window_manager()));
// When added to the shared node, the entire hierarchy and all property
« no previous file with comments | « mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698