| Index: components/html_viewer/html_frame_apptest.cc
|
| diff --git a/components/html_viewer/html_frame_apptest.cc b/components/html_viewer/html_frame_apptest.cc
|
| index ac144e5844838c502de9d8278b68c94470942897..6703d26fe390ff38e795aafd721efe97a3ef6b58 100644
|
| --- a/components/html_viewer/html_frame_apptest.cc
|
| +++ b/components/html_viewer/html_frame_apptest.cc
|
| @@ -12,7 +12,7 @@
|
| #include "base/test/test_timeouts.h"
|
| #include "base/values.h"
|
| #include "components/html_viewer/public/interfaces/test_html_viewer.mojom.h"
|
| -#include "components/mus/public/cpp/tests/view_manager_test_base.h"
|
| +#include "components/mus/public/cpp/tests/mandoline_ui_services_test_base.h"
|
| #include "components/mus/public/cpp/view.h"
|
| #include "components/mus/public/cpp/view_tree_connection.h"
|
| #include "components/web_view/frame.h"
|
| @@ -24,6 +24,7 @@
|
| #include "net/test/spawned_test_server/spawned_test_server.h"
|
| #include "third_party/mojo_services/src/accessibility/public/interfaces/accessibility.mojom.h"
|
|
|
| +using mus::MandolineUIServicesTestBase;
|
| using web_view::Frame;
|
| using web_view::FrameConnection;
|
| using web_view::FrameTree;
|
| @@ -41,7 +42,7 @@ const char kAddFrameWithEmptyPageScript[] =
|
|
|
| void OnGotContentHandlerForRoot(bool* got_callback) {
|
| *got_callback = true;
|
| - ignore_result(ViewManagerTestBase::QuitRunLoop());
|
| + ignore_result(MandolineUIServicesTestBase::QuitRunLoop());
|
| }
|
|
|
| mojo::ApplicationConnection* ApplicationConnectionForFrame(Frame* frame) {
|
| @@ -55,9 +56,9 @@ std::string GetFrameText(ApplicationConnection* connection) {
|
| std::string result;
|
| test_html_viewer->GetContentAsText([&result](const String& mojo_string) {
|
| result = mojo_string;
|
| - ASSERT_TRUE(ViewManagerTestBase::QuitRunLoop());
|
| + ASSERT_TRUE(MandolineUIServicesTestBase::QuitRunLoop());
|
| });
|
| - if (!ViewManagerTestBase::DoRunLoopWithTimeout())
|
| + if (!MandolineUIServicesTestBase::DoRunLoopWithTimeout())
|
| ADD_FAILURE() << "Timed out waiting for execute to complete";
|
| // test_html_viewer.WaitForIncomingResponse();
|
| return result;
|
| @@ -70,9 +71,9 @@ scoped_ptr<base::Value> ExecuteScript(ApplicationConnection* connection,
|
| scoped_ptr<base::Value> result;
|
| test_html_viewer->ExecuteScript(script, [&result](const String& json_string) {
|
| result = base::JSONReader::Read(json_string.To<std::string>());
|
| - ASSERT_TRUE(ViewManagerTestBase::QuitRunLoop());
|
| + ASSERT_TRUE(MandolineUIServicesTestBase::QuitRunLoop());
|
| });
|
| - if (!ViewManagerTestBase::DoRunLoopWithTimeout())
|
| + if (!MandolineUIServicesTestBase::DoRunLoopWithTimeout())
|
| ADD_FAILURE() << "Timed out waiting for execute to complete";
|
| return result.Pass();
|
| }
|
| @@ -104,7 +105,7 @@ class TestFrameTreeDelegateImpl : public web_view::TestFrameTreeDelegate {
|
| return true;
|
|
|
| base::AutoReset<bool> resetter(&waiting_for_navigate_, true);
|
| - return ViewManagerTestBase::DoRunLoopWithTimeout() && got_navigate_;
|
| + return MandolineUIServicesTestBase::DoRunLoopWithTimeout() && got_navigate_;
|
| }
|
|
|
| // TestFrameTreeDelegate:
|
| @@ -119,7 +120,7 @@ class TestFrameTreeDelegateImpl : public web_view::TestFrameTreeDelegate {
|
| got_navigate_ = true;
|
|
|
| if (waiting_for_navigate_)
|
| - ignore_result(ViewManagerTestBase::QuitRunLoop());
|
| + ignore_result(MandolineUIServicesTestBase::QuitRunLoop());
|
| }
|
|
|
| private:
|
| @@ -132,7 +133,7 @@ class TestFrameTreeDelegateImpl : public web_view::TestFrameTreeDelegate {
|
|
|
| } // namespace
|
|
|
| -class HTMLFrameTest : public ViewManagerTestBase {
|
| +class HTMLFrameTest : public MandolineUIServicesTestBase {
|
| public:
|
| HTMLFrameTest() {}
|
| ~HTMLFrameTest() override {}
|
| @@ -141,7 +142,7 @@ class HTMLFrameTest : public ViewManagerTestBase {
|
| // Creates the frame tree showing an empty page at the root and adds (via
|
| // script) a frame showing the same empty page.
|
| Frame* LoadEmptyPageAndCreateFrame() {
|
| - View* embed_view = window_manager()->CreateView();
|
| + mus::View* embed_view = window_manager()->CreateView();
|
| frame_tree_delegate_.reset(
|
| new TestFrameTreeDelegateImpl(application_impl()));
|
| FrameConnection* root_connection =
|
| @@ -194,7 +195,8 @@ class HTMLFrameTest : public ViewManagerTestBase {
|
| return request.Pass();
|
| }
|
|
|
| - FrameConnection* InitFrameTree(View* view, const std::string& url_string) {
|
| + FrameConnection* InitFrameTree(mus::View* view,
|
| + const std::string& url_string) {
|
| frame_tree_delegate_.reset(
|
| new TestFrameTreeDelegateImpl(application_impl()));
|
| scoped_ptr<FrameConnection> frame_connection(new FrameConnection);
|
| @@ -202,7 +204,7 @@ class HTMLFrameTest : public ViewManagerTestBase {
|
| frame_connection->Init(
|
| application_impl(), BuildRequestForURL(url_string),
|
| base::Bind(&OnGotContentHandlerForRoot, &got_callback));
|
| - ignore_result(ViewManagerTestBase::DoRunLoopWithTimeout());
|
| + ignore_result(MandolineUIServicesTestBase::DoRunLoopWithTimeout());
|
| if (!got_callback)
|
| return nullptr;
|
| FrameConnection* result = frame_connection.get();
|
| @@ -226,7 +228,7 @@ class HTMLFrameTest : public ViewManagerTestBase {
|
|
|
| // ViewManagerTest:
|
| void SetUp() override {
|
| - ViewManagerTestBase::SetUp();
|
| + MandolineUIServicesTestBase::SetUp();
|
|
|
| // Start a test server.
|
| http_server_.reset(new net::SpawnedTestServer(
|
| @@ -237,7 +239,7 @@ class HTMLFrameTest : public ViewManagerTestBase {
|
| void TearDown() override {
|
| frame_tree_.reset();
|
| http_server_.reset();
|
| - ViewManagerTestBase::TearDown();
|
| + MandolineUIServicesTestBase::TearDown();
|
| }
|
|
|
| scoped_ptr<net::SpawnedTestServer> http_server_;
|
| @@ -250,7 +252,7 @@ class HTMLFrameTest : public ViewManagerTestBase {
|
| };
|
|
|
| TEST_F(HTMLFrameTest, PageWithSingleFrame) {
|
| - View* embed_view = window_manager()->CreateView();
|
| + mus::View* embed_view = window_manager()->CreateView();
|
|
|
| FrameConnection* root_connection = InitFrameTree(
|
| embed_view, "http://127.0.0.1:%u/files/page_with_single_frame.html");
|
| @@ -279,7 +281,7 @@ TEST_F(HTMLFrameTest, PageWithSingleFrame) {
|
| // Creates two frames. The parent navigates the child frame by way of changing
|
| // the location of the child frame.
|
| TEST_F(HTMLFrameTest, ChangeLocationOfChildFrame) {
|
| - View* embed_view = window_manager()->CreateView();
|
| + mus::View* embed_view = window_manager()->CreateView();
|
|
|
| ASSERT_TRUE(InitFrameTree(
|
| embed_view, "http://127.0.0.1:%u/files/page_with_single_frame.html"));
|
|
|