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

Side by Side Diff: services/navigation/navigation_unittest.cc

Issue 2617883002: Add a new BindInterface() method to Connector. (Closed)
Patch Set: . Created 3 years, 11 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 <memory> 5 #include <memory>
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "mojo/public/cpp/bindings/binding.h" 9 #include "mojo/public/cpp/bindings/binding.h"
10 #include "services/navigation/public/interfaces/view.mojom.h" 10 #include "services/navigation/public/interfaces/view.mojom.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 mojo::Binding<mojom::ViewClient> binding_; 67 mojo::Binding<mojom::ViewClient> binding_;
68 base::RunLoop* loop_ = nullptr; 68 base::RunLoop* loop_ = nullptr;
69 std::unique_ptr<service_manager::Connection> window_manager_connection_; 69 std::unique_ptr<service_manager::Connection> window_manager_connection_;
70 70
71 DISALLOW_COPY_AND_ASSIGN(NavigationTest); 71 DISALLOW_COPY_AND_ASSIGN(NavigationTest);
72 }; 72 };
73 73
74 // See crbug.com/619523 74 // See crbug.com/619523
75 TEST_F(NavigationTest, DISABLED_Navigate) { 75 TEST_F(NavigationTest, DISABLED_Navigate) {
76 mojom::ViewFactoryPtr view_factory; 76 mojom::ViewFactoryPtr view_factory;
77 connector()->ConnectToInterface("navigation", &view_factory); 77 connector()->BindInterface("navigation", &view_factory);
78 78
79 mojom::ViewPtr view; 79 mojom::ViewPtr view;
80 view_factory->CreateView(GetViewClient(), MakeRequest(&view)); 80 view_factory->CreateView(GetViewClient(), MakeRequest(&view));
81 view->NavigateTo(GURL("about:blank")); 81 view->NavigateTo(GURL("about:blank"));
82 82
83 base::RunLoop loop; 83 base::RunLoop loop;
84 QuitOnLoadingStateChange(&loop); 84 QuitOnLoadingStateChange(&loop);
85 loop.Run(); 85 loop.Run();
86 } 86 }
87 87
88 } // namespace navigation 88 } // namespace navigation
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698