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 "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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 return false; | 223 return false; |
224 | 224 |
225 frame_tree_delegate_->clear_got_navigate(); | 225 frame_tree_delegate_->clear_got_navigate(); |
226 return frame_tree_delegate_->WaitForNavigateFrame(); | 226 return frame_tree_delegate_->WaitForNavigateFrame(); |
227 } | 227 } |
228 | 228 |
229 // ViewManagerTest: | 229 // ViewManagerTest: |
230 void SetUp() override { | 230 void SetUp() override { |
231 ViewManagerTestBase::SetUp(); | 231 ViewManagerTestBase::SetUp(); |
232 | 232 |
233 // Make it so we get OnEmbedForDescendant(). | |
234 window_manager()->SetEmbedRoot(); | |
235 | |
236 // Start a test server. | 233 // Start a test server. |
237 http_server_.reset(new net::SpawnedTestServer( | 234 http_server_.reset(new net::SpawnedTestServer( |
238 net::SpawnedTestServer::TYPE_HTTP, net::SpawnedTestServer::kLocalhost, | 235 net::SpawnedTestServer::TYPE_HTTP, net::SpawnedTestServer::kLocalhost, |
239 base::FilePath(FILE_PATH_LITERAL("components/test/data/html_viewer")))); | 236 base::FilePath(FILE_PATH_LITERAL("components/test/data/html_viewer")))); |
240 ASSERT_TRUE(http_server_->Start()); | 237 ASSERT_TRUE(http_server_->Start()); |
241 } | 238 } |
242 void TearDown() override { | 239 void TearDown() override { |
243 frame_tree_.reset(); | 240 frame_tree_.reset(); |
244 http_server_.reset(); | 241 http_server_.reset(); |
245 ViewManagerTestBase::TearDown(); | 242 ViewManagerTestBase::TearDown(); |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 script_value_as_list->GetString(0u, &message_in_child); | 470 script_value_as_list->GetString(0u, &message_in_child); |
474 } | 471 } |
475 } | 472 } |
476 } while (message_in_child != "hello from parent" && | 473 } while (message_in_child != "hello from parent" && |
477 base::TimeTicks::Now() - start_time < | 474 base::TimeTicks::Now() - start_time < |
478 TestTimeouts::action_timeout()); | 475 TestTimeouts::action_timeout()); |
479 EXPECT_EQ("hello from parent", message_in_child); | 476 EXPECT_EQ("hello from parent", message_in_child); |
480 } | 477 } |
481 | 478 |
482 } // namespace mojo | 479 } // namespace mojo |
OLD | NEW |