| OLD | NEW |
| 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 "mandoline/tab/frame.h" | 5 #include "mandoline/tab/frame.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 connection->AddService(view_manager_client_factory_.get()); | 83 connection->AddService(view_manager_client_factory_.get()); |
| 84 return true; | 84 return true; |
| 85 } | 85 } |
| 86 | 86 |
| 87 ViewManager* window_manager() { return window_manager_; } | 87 ViewManager* window_manager() { return window_manager_; } |
| 88 | 88 |
| 89 // ApplicationTestBase: | 89 // ApplicationTestBase: |
| 90 ApplicationDelegate* GetApplicationDelegate() override { return this; } | 90 ApplicationDelegate* GetApplicationDelegate() override { return this; } |
| 91 | 91 |
| 92 // Overridden from ViewManagerDelegate: | 92 // Overridden from ViewManagerDelegate: |
| 93 void OnEmbed(View* root, | 93 void OnEmbed(View* root) override { |
| 94 mojo::InterfaceRequest<mojo::ServiceProvider> services, | |
| 95 mojo::ServiceProviderPtr exposed_services) override { | |
| 96 most_recent_view_manager_ = root->view_manager(); | 94 most_recent_view_manager_ = root->view_manager(); |
| 97 QuitRunLoop(); | 95 QuitRunLoop(); |
| 98 } | 96 } |
| 99 void OnViewManagerDestroyed(ViewManager* view_manager) override {} | 97 void OnViewManagerDestroyed(ViewManager* view_manager) override {} |
| 100 | 98 |
| 101 private: | 99 private: |
| 102 // Overridden from testing::Test: | 100 // Overridden from testing::Test: |
| 103 void SetUp() override { | 101 void SetUp() override { |
| 104 ApplicationTestBase::SetUp(); | 102 ApplicationTestBase::SetUp(); |
| 105 | 103 |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 EXPECT_EQ(tree.root()->view()->id(), frames_in_child[0]->frame_id); | 211 EXPECT_EQ(tree.root()->view()->id(), frames_in_child[0]->frame_id); |
| 214 EXPECT_EQ(0u, frames_in_child[0]->parent_id); | 212 EXPECT_EQ(0u, frames_in_child[0]->parent_id); |
| 215 EXPECT_EQ(child_frame->view()->id(), frames_in_child[1]->frame_id); | 213 EXPECT_EQ(child_frame->view()->id(), frames_in_child[1]->frame_id); |
| 216 EXPECT_EQ(tree.root()->view()->id(), frames_in_child[1]->parent_id); | 214 EXPECT_EQ(tree.root()->view()->id(), frames_in_child[1]->parent_id); |
| 217 | 215 |
| 218 // The root did the add, so it shouldn't get an add. | 216 // The root did the add, so it shouldn't get an add. |
| 219 EXPECT_EQ(0u, root_client.adds().size()); | 217 EXPECT_EQ(0u, root_client.adds().size()); |
| 220 } | 218 } |
| 221 | 219 |
| 222 } // namespace mandoline | 220 } // namespace mandoline |
| OLD | NEW |