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

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

Issue 1314953002: Rename ViewManagerService,ViewManagerClient -> ViewTree,ViewTreeClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 3 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 | « no previous file | components/html_viewer/html_document_oopif.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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "base/test/test_timeouts.h" 9 #include "base/test/test_timeouts.h"
10 #include "components/view_manager/public/cpp/tests/view_manager_test_base.h" 10 #include "components/view_manager/public/cpp/tests/view_manager_test_base.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 // Connect to the URL through the mojo:html_viewer content handler. 73 // Connect to the URL through the mojo:html_viewer content handler.
74 const uint16_t assigned_port = server.host_port_pair().port(); 74 const uint16_t assigned_port = server.host_port_pair().port();
75 mojo::URLRequestPtr request(mojo::URLRequest::New()); 75 mojo::URLRequestPtr request(mojo::URLRequest::New());
76 request->url = mojo::String::From( 76 request->url = mojo::String::From(
77 base::StringPrintf("http://127.0.0.1:%u/files/test.html", assigned_port)); 77 base::StringPrintf("http://127.0.0.1:%u/files/test.html", assigned_port));
78 scoped_ptr<ApplicationConnection> connection = 78 scoped_ptr<ApplicationConnection> connection =
79 application_impl()->ConnectToApplication(request.Pass()); 79 application_impl()->ConnectToApplication(request.Pass());
80 80
81 // Embed the html_viewer in a View. 81 // Embed the html_viewer in a View.
82 ViewManagerClientPtr view_manager_client; 82 ViewTreeClientPtr tree_client;
83 connection->ConnectToService(&view_manager_client); 83 connection->ConnectToService(&tree_client);
84 View* embed_view = window_manager()->CreateView(); 84 View* embed_view = window_manager()->CreateView();
85 embed_view->Embed(view_manager_client.Pass()); 85 embed_view->Embed(tree_client.Pass());
86 86
87 TestFrameTreeServer frame_tree_server; 87 TestFrameTreeServer frame_tree_server;
88 mandoline::FrameTreeServerPtr frame_tree_server_ptr; 88 mandoline::FrameTreeServerPtr frame_tree_server_ptr;
89 mojo::Binding<mandoline::FrameTreeServer> frame_tree_server_binding( 89 mojo::Binding<mandoline::FrameTreeServer> frame_tree_server_binding(
90 &frame_tree_server); 90 &frame_tree_server);
91 frame_tree_server_binding.Bind(GetProxy(&frame_tree_server_ptr).Pass()); 91 frame_tree_server_binding.Bind(GetProxy(&frame_tree_server_ptr).Pass());
92 92
93 mojo::Array<mandoline::FrameDataPtr> array(1u); 93 mojo::Array<mandoline::FrameDataPtr> array(1u);
94 array[0] = mandoline::FrameData::New().Pass(); 94 array[0] = mandoline::FrameData::New().Pass();
95 array[0]->frame_id = embed_view->id(); 95 array[0]->frame_id = embed_view->id();
(...skipping 13 matching lines...) Expand all
109 EXPECT_TRUE(QuitRunLoop()); 109 EXPECT_TRUE(QuitRunLoop());
110 }); 110 });
111 ASSERT_TRUE(DoRunLoopWithTimeout()); 111 ASSERT_TRUE(DoRunLoopWithTimeout());
112 112
113 EXPECT_TRUE(AxTreeContainsText(ax_tree, "Hello ")); 113 EXPECT_TRUE(AxTreeContainsText(ax_tree, "Hello "));
114 EXPECT_TRUE(AxTreeContainsText(ax_tree, "World!")); 114 EXPECT_TRUE(AxTreeContainsText(ax_tree, "World!"));
115 EXPECT_FALSE(AxTreeContainsText(ax_tree, "foo")); 115 EXPECT_FALSE(AxTreeContainsText(ax_tree, "foo"));
116 } 116 }
117 117
118 } // namespace mojo 118 } // namespace mojo
OLDNEW
« no previous file with comments | « no previous file | components/html_viewer/html_document_oopif.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698