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

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

Issue 1406153004: components/mus/public/interfaces View => Window (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Yet another rebase 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 | « no previous file | components/html_viewer/document_resource_waiter.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 "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 // Connect to the URL through the mojo:html_viewer content handler. 80 // Connect to the URL through the mojo:html_viewer content handler.
81 const uint16_t assigned_port = server.host_port_pair().port(); 81 const uint16_t assigned_port = server.host_port_pair().port();
82 mojo::URLRequestPtr request(mojo::URLRequest::New()); 82 mojo::URLRequestPtr request(mojo::URLRequest::New());
83 request->url = mojo::String::From( 83 request->url = mojo::String::From(
84 base::StringPrintf("http://127.0.0.1:%u/files/test.html", assigned_port)); 84 base::StringPrintf("http://127.0.0.1:%u/files/test.html", assigned_port));
85 scoped_ptr<ApplicationConnection> connection = 85 scoped_ptr<ApplicationConnection> connection =
86 application_impl()->ConnectToApplication(request.Pass()); 86 application_impl()->ConnectToApplication(request.Pass());
87 87
88 // Embed the html_viewer in a Window. 88 // Embed the html_viewer in a Window.
89 ViewTreeClientPtr tree_client; 89 mus::mojom::WindowTreeClientPtr tree_client;
90 connection->ConnectToService(&tree_client); 90 connection->ConnectToService(&tree_client);
91 mus::Window* embed_window = window_manager()->CreateWindow(); 91 mus::Window* embed_window = window_manager()->CreateWindow();
92 embed_window->Embed(tree_client.Pass()); 92 embed_window->Embed(tree_client.Pass());
93 93
94 TestFrame frame; 94 TestFrame frame;
95 web_view::mojom::FramePtr frame_ptr; 95 web_view::mojom::FramePtr frame_ptr;
96 mojo::Binding<web_view::mojom::Frame> frame_binding(&frame); 96 mojo::Binding<web_view::mojom::Frame> frame_binding(&frame);
97 frame_binding.Bind(GetProxy(&frame_ptr).Pass()); 97 frame_binding.Bind(GetProxy(&frame_ptr).Pass());
98 98
99 mojo::Array<web_view::mojom::FrameDataPtr> array(1u); 99 mojo::Array<web_view::mojom::FrameDataPtr> array(1u);
(...skipping 17 matching lines...) Expand all
117 EXPECT_TRUE(QuitRunLoop()); 117 EXPECT_TRUE(QuitRunLoop());
118 }); 118 });
119 ASSERT_TRUE(DoRunLoopWithTimeout()); 119 ASSERT_TRUE(DoRunLoopWithTimeout());
120 120
121 EXPECT_TRUE(AxTreeContainsText(ax_tree, "Hello ")); 121 EXPECT_TRUE(AxTreeContainsText(ax_tree, "Hello "));
122 EXPECT_TRUE(AxTreeContainsText(ax_tree, "World!")); 122 EXPECT_TRUE(AxTreeContainsText(ax_tree, "World!"));
123 EXPECT_FALSE(AxTreeContainsText(ax_tree, "foo")); 123 EXPECT_FALSE(AxTreeContainsText(ax_tree, "foo"));
124 } 124 }
125 125
126 } // namespace mojo 126 } // namespace mojo
OLDNEW
« no previous file with comments | « no previous file | components/html_viewer/document_resource_waiter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698