| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/memory/ptr_util.h" | 5 #include "base/memory/ptr_util.h" |
| 6 #include "blimp/client/core/contents/mock_navigation_feature_delegate.h" | 6 #include "blimp/client/core/contents/mock_navigation_feature_delegate.h" |
| 7 #include "blimp/client/core/contents/navigation_feature.h" | 7 #include "blimp/client/core/contents/navigation_feature.h" |
| 8 #include "blimp/client/core/session/assignment_source.h" | 8 #include "blimp/client/core/session/assignment_source.h" |
| 9 #include "blimp/client/feature/ime_feature.h" | 9 #include "blimp/client/feature/ime_feature.h" |
| 10 #include "blimp/client/feature/mock_ime_feature_delegate.h" | 10 #include "blimp/client/feature/mock_ime_feature_delegate.h" |
| 11 #include "blimp/client/feature/mock_render_widget_feature_delegate.h" | 11 #include "blimp/client/feature/mock_render_widget_feature_delegate.h" |
| 12 #include "blimp/client/feature/render_widget_feature.h" | 12 #include "blimp/client/feature/render_widget_feature.h" |
| 13 #include "blimp/client/feature/tab_control_feature.h" | 13 #include "blimp/client/feature/tab_control_feature.h" |
| 14 #include "blimp/client/public/session/assignment.h" |
| 14 #include "blimp/client/session/test_client_session.h" | 15 #include "blimp/client/session/test_client_session.h" |
| 15 #include "blimp/engine/browser_tests/blimp_browser_test.h" | 16 #include "blimp/engine/browser_tests/blimp_browser_test.h" |
| 16 #include "content/public/test/browser_test.h" | 17 #include "content/public/test/browser_test.h" |
| 17 #include "net/base/ip_address.h" | 18 #include "net/base/ip_address.h" |
| 18 #include "net/base/ip_endpoint.h" | 19 #include "net/base/ip_endpoint.h" |
| 19 #include "testing/gmock/include/gmock/gmock.h" | 20 #include "testing/gmock/include/gmock/gmock.h" |
| 20 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
| 21 #include "ui/gfx/geometry/size.h" | 22 #include "ui/gfx/geometry/size.h" |
| 22 #include "url/gurl.h" | 23 #include "url/gurl.h" |
| 23 | 24 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 | 61 |
| 61 IN_PROC_BROWSER_TEST_F(EngineBrowserTest, LoadUrl) { | 62 IN_PROC_BROWSER_TEST_F(EngineBrowserTest, LoadUrl) { |
| 62 EXPECT_TRUE(embedded_test_server()->Start()); | 63 EXPECT_TRUE(embedded_test_server()->Start()); |
| 63 GURL url = embedded_test_server()->GetURL("/hello.html"); | 64 GURL url = embedded_test_server()->GetURL("/hello.html"); |
| 64 | 65 |
| 65 EXPECT_CALL(client_rw_feature_delegate_, OnRenderWidgetCreated(1)); | 66 EXPECT_CALL(client_rw_feature_delegate_, OnRenderWidgetCreated(1)); |
| 66 EXPECT_CALL(client_nav_feature_delegate_, OnUrlChanged(kDummyTabId, url)) | 67 EXPECT_CALL(client_nav_feature_delegate_, OnUrlChanged(kDummyTabId, url)) |
| 67 .WillOnce(InvokeWithoutArgs(this, &EngineBrowserTest::QuitRunLoop)); | 68 .WillOnce(InvokeWithoutArgs(this, &EngineBrowserTest::QuitRunLoop)); |
| 68 | 69 |
| 69 // Skip assigner. Engine info is already available. | 70 // Skip assigner. Engine info is already available. |
| 70 client_session_->ConnectWithAssignment( | 71 client_session_->ConnectWithAssignment(client::ASSIGNMENT_REQUEST_RESULT_OK, |
| 71 client::AssignmentSource::Result::RESULT_OK, GetAssignment()); | 72 GetAssignment()); |
| 72 client_session_->GetTabControlFeature()->SetSizeAndScale(gfx::Size(100, 100), | 73 client_session_->GetTabControlFeature()->SetSizeAndScale(gfx::Size(100, 100), |
| 73 1); | 74 1); |
| 74 client_session_->GetTabControlFeature()->CreateTab(kDummyTabId); | 75 client_session_->GetTabControlFeature()->CreateTab(kDummyTabId); |
| 75 client_session_->GetNavigationFeature()->NavigateToUrlText(kDummyTabId, | 76 client_session_->GetNavigationFeature()->NavigateToUrlText(kDummyTabId, |
| 76 url.spec()); | 77 url.spec()); |
| 77 | 78 |
| 78 RunUntilQuit(); | 79 RunUntilQuit(); |
| 79 } | 80 } |
| 80 | 81 |
| 81 } // namespace | 82 } // namespace |
| 82 } // namespace blimp | 83 } // namespace blimp |
| OLD | NEW |