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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 connect_frames_ = frames.Pass(); | 146 connect_frames_ = frames.Pass(); |
147 server_ = server.Pass(); | 147 server_ = server.Pass(); |
148 } | 148 } |
149 void OnFrameAdded(uint32_t change_id, FrameDataPtr frame) override { | 149 void OnFrameAdded(uint32_t change_id, FrameDataPtr frame) override { |
150 adds_.push_back(frame.Pass()); | 150 adds_.push_back(frame.Pass()); |
151 } | 151 } |
152 void OnFrameRemoved(uint32_t change_id, uint32_t frame_id) override {} | 152 void OnFrameRemoved(uint32_t change_id, uint32_t frame_id) override {} |
153 void OnFrameClientPropertyChanged(uint32_t frame_id, | 153 void OnFrameClientPropertyChanged(uint32_t frame_id, |
154 const mojo::String& name, | 154 const mojo::String& name, |
155 mojo::Array<uint8_t> new_data) override {} | 155 mojo::Array<uint8_t> new_data) override {} |
| 156 void PostMessage(uint32_t source_frame_id, |
| 157 uint32_t target_frame_id, |
| 158 HTMLMessageEventPtr event) override {} |
156 | 159 |
157 private: | 160 private: |
158 int connect_count_; | 161 int connect_count_; |
159 mojo::Array<FrameDataPtr> connect_frames_; | 162 mojo::Array<FrameDataPtr> connect_frames_; |
160 FrameTreeServerPtr server_; | 163 FrameTreeServerPtr server_; |
161 mojo::Array<FrameDataPtr> adds_; | 164 mojo::Array<FrameDataPtr> adds_; |
162 | 165 |
163 DISALLOW_COPY_AND_ASSIGN(TestFrameTreeClient); | 166 DISALLOW_COPY_AND_ASSIGN(TestFrameTreeClient); |
164 }; | 167 }; |
165 | 168 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 EXPECT_EQ(tree.root()->view()->id(), frames_in_child[0]->frame_id); | 203 EXPECT_EQ(tree.root()->view()->id(), frames_in_child[0]->frame_id); |
201 EXPECT_EQ(0u, frames_in_child[0]->parent_id); | 204 EXPECT_EQ(0u, frames_in_child[0]->parent_id); |
202 EXPECT_EQ(child_frame->view()->id(), frames_in_child[1]->frame_id); | 205 EXPECT_EQ(child_frame->view()->id(), frames_in_child[1]->frame_id); |
203 EXPECT_EQ(tree.root()->view()->id(), frames_in_child[1]->parent_id); | 206 EXPECT_EQ(tree.root()->view()->id(), frames_in_child[1]->parent_id); |
204 | 207 |
205 // We should have gotten notification of the add. | 208 // We should have gotten notification of the add. |
206 EXPECT_EQ(1u, root_client.adds().size()); | 209 EXPECT_EQ(1u, root_client.adds().size()); |
207 } | 210 } |
208 | 211 |
209 } // namespace mandoline | 212 } // namespace mandoline |
OLD | NEW |