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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 void OnConnect(FrameTreeServerPtr server, | 159 void OnConnect(FrameTreeServerPtr server, |
160 mojo::Array<FrameDataPtr> frames) override { | 160 mojo::Array<FrameDataPtr> frames) override { |
161 connect_count_++; | 161 connect_count_++; |
162 connect_frames_ = frames.Pass(); | 162 connect_frames_ = frames.Pass(); |
163 server_ = server.Pass(); | 163 server_ = server.Pass(); |
164 } | 164 } |
165 void OnFrameAdded(FrameDataPtr frame) override { | 165 void OnFrameAdded(FrameDataPtr frame) override { |
166 adds_.push_back(frame.Pass()); | 166 adds_.push_back(frame.Pass()); |
167 } | 167 } |
168 void OnFrameRemoved(uint32_t frame_id) override {} | 168 void OnFrameRemoved(uint32_t frame_id) override {} |
| 169 void OnFrameNameChanged(uint32_t frame_id, |
| 170 const mojo::String& name) override {} |
169 | 171 |
170 private: | 172 private: |
171 int connect_count_; | 173 int connect_count_; |
172 mojo::Array<FrameDataPtr> connect_frames_; | 174 mojo::Array<FrameDataPtr> connect_frames_; |
173 FrameTreeServerPtr server_; | 175 FrameTreeServerPtr server_; |
174 mojo::Array<FrameDataPtr> adds_; | 176 mojo::Array<FrameDataPtr> adds_; |
175 | 177 |
176 DISALLOW_COPY_AND_ASSIGN(TestFrameTreeClient); | 178 DISALLOW_COPY_AND_ASSIGN(TestFrameTreeClient); |
177 }; | 179 }; |
178 | 180 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 EXPECT_EQ(tree.root()->view()->id(), frames_in_child[0]->frame_id); | 215 EXPECT_EQ(tree.root()->view()->id(), frames_in_child[0]->frame_id); |
214 EXPECT_EQ(0u, frames_in_child[0]->parent_id); | 216 EXPECT_EQ(0u, frames_in_child[0]->parent_id); |
215 EXPECT_EQ(child_frame->view()->id(), frames_in_child[1]->frame_id); | 217 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); | 218 EXPECT_EQ(tree.root()->view()->id(), frames_in_child[1]->parent_id); |
217 | 219 |
218 // The root did the add, so it shouldn't get an add. | 220 // The root did the add, so it shouldn't get an add. |
219 EXPECT_EQ(0u, root_client.adds().size()); | 221 EXPECT_EQ(0u, root_client.adds().size()); |
220 } | 222 } |
221 | 223 |
222 } // namespace mandoline | 224 } // namespace mandoline |
OLD | NEW |