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

Side by Side Diff: components/html_viewer/html_frame_apptest.cc

Issue 1414663002: Mandoline webview: View => Window (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More renaming Created 5 years, 2 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 | « components/html_viewer/html_frame.cc ('k') | components/html_viewer/html_frame_tree_manager.cc » ('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 "base/auto_reset.h" 5 #include "base/auto_reset.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 const size_t initial_frame_count = parent->children().size(); 192 const size_t initial_frame_count = parent->children().size();
193 // Dynamically add a new frame. 193 // Dynamically add a new frame.
194 ExecuteScript(ApplicationConnectionForFrame(parent), 194 ExecuteScript(ApplicationConnectionForFrame(parent),
195 AddPortToString(kAddFrameWithEmptyPageScript)); 195 AddPortToString(kAddFrameWithEmptyPageScript));
196 196
197 frame_tree_delegate_->WaitForChildFrameCount(parent, 197 frame_tree_delegate_->WaitForChildFrameCount(parent,
198 initial_frame_count + 1); 198 initial_frame_count + 1);
199 if (HasFatalFailure()) 199 if (HasFatalFailure())
200 return nullptr; 200 return nullptr;
201 201
202 return parent->FindFrame(parent->view()->children().back()->id()); 202 return parent->FindFrame(parent->window()->children().back()->id());
203 } 203 }
204 204
205 std::string AddPortToString(const std::string& string) { 205 std::string AddPortToString(const std::string& string) {
206 const uint16_t assigned_port = http_server_->host_port_pair().port(); 206 const uint16_t assigned_port = http_server_->host_port_pair().port();
207 return base::StringPrintf(string.c_str(), assigned_port); 207 return base::StringPrintf(string.c_str(), assigned_port);
208 } 208 }
209 209
210 mojo::URLRequestPtr BuildRequestForURL(const std::string& url_string) { 210 mojo::URLRequestPtr BuildRequestForURL(const std::string& url_string) {
211 mojo::URLRequestPtr request(mojo::URLRequest::New()); 211 mojo::URLRequestPtr request(mojo::URLRequest::New());
212 request->url = mojo::String::From(AddPortToString(url_string)); 212 request->url = mojo::String::From(AddPortToString(url_string));
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 script_value_as_list->GetString(0u, &message_in_child); 473 script_value_as_list->GetString(0u, &message_in_child);
474 } 474 }
475 } 475 }
476 } while (message_in_child != "hello from parent" && 476 } while (message_in_child != "hello from parent" &&
477 base::TimeTicks::Now() - start_time < 477 base::TimeTicks::Now() - start_time <
478 TestTimeouts::action_timeout()); 478 TestTimeouts::action_timeout());
479 EXPECT_EQ("hello from parent", message_in_child); 479 EXPECT_EQ("hello from parent", message_in_child);
480 } 480 }
481 481
482 } // namespace mojo 482 } // namespace mojo
OLDNEW
« no previous file with comments | « components/html_viewer/html_frame.cc ('k') | components/html_viewer/html_frame_tree_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698