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

Side by Side Diff: mandoline/tab/frame_apptest.cc

Issue 1270313006: Connects PostMessage() for OOPIFs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix windows Created 5 years, 4 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
« no previous file with comments | « mandoline/tab/frame.cc ('k') | mandoline/tab/frame_tree_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "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
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
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
OLDNEW
« no previous file with comments | « mandoline/tab/frame.cc ('k') | mandoline/tab/frame_tree_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698