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

Side by Side Diff: mojo/services/view_manager/view_manager_connection_unittest.cc

Issue 289063015: Mojo: Remove SetClient from generated interfaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 }; 370 };
371 371
372 class ViewManagerConnectionTest : public testing::Test { 372 class ViewManagerConnectionTest : public testing::Test {
373 public: 373 public:
374 ViewManagerConnectionTest() {} 374 ViewManagerConnectionTest() {}
375 375
376 virtual void SetUp() OVERRIDE { 376 virtual void SetUp() OVERRIDE {
377 test_helper_.Init(); 377 test_helper_.Init();
378 378
379 ConnectTo(test_helper_.shell(), "mojo:mojo_view_manager", &view_manager_); 379 ConnectTo(test_helper_.shell(), "mojo:mojo_view_manager", &view_manager_);
380 view_manager_->SetClient(&client_); 380 view_manager_.set_client(&client_);
381 381
382 client_.WaitForId(); 382 client_.WaitForId();
383 client_.GetAndClearChanges(); 383 client_.GetAndClearChanges();
384 } 384 }
385 385
386 protected: 386 protected:
387 // Creates a second connection to the viewmanager. 387 // Creates a second connection to the viewmanager.
388 void EstablishSecondConnection() { 388 void EstablishSecondConnection() {
389 ConnectTo(test_helper_.shell(), "mojo:mojo_view_manager", &view_manager2_); 389 ConnectTo(test_helper_.shell(), "mojo:mojo_view_manager", &view_manager2_);
390 view_manager2_->SetClient(&client2_); 390 view_manager2_.set_client(&client2_);
391 391
392 client2_.WaitForId(); 392 client2_.WaitForId();
393 client2_.GetAndClearChanges(); 393 client2_.GetAndClearChanges();
394 } 394 }
395 395
396 void EstablishSecondConnectionWithRoot(TransportNodeId root_id) { 396 void EstablishSecondConnectionWithRoot(TransportNodeId root_id) {
397 EstablishSecondConnection(); 397 EstablishSecondConnection();
398 client2_.ClearId(); 398 client2_.ClearId();
399 399
400 AllocationScope scope; 400 AllocationScope scope;
(...skipping 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after
1439 ASSERT_EQ(1u, nodes.size()); 1439 ASSERT_EQ(1u, nodes.size());
1440 EXPECT_EQ("node=1,1 parent=null view=null", nodes[0].ToString()); 1440 EXPECT_EQ("node=1,1 parent=null view=null", nodes[0].ToString());
1441 } 1441 }
1442 1442
1443 // TODO(sky): add coverage of test that destroys connections and ensures other 1443 // TODO(sky): add coverage of test that destroys connections and ensures other
1444 // connections get deletion notification (or advanced server id). 1444 // connections get deletion notification (or advanced server id).
1445 1445
1446 } // namespace service 1446 } // namespace service
1447 } // namespace view_manager 1447 } // namespace view_manager
1448 } // namespace mojo 1448 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.cc ('k') | mojo/shell/app_child_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698