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

Unified Diff: components/html_viewer/html_frame_apptest.cc

Issue 1674903003: Extract shell methods from ApplicationImpl into a base class, and pass this to Initialize() instead. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojom
Patch Set: . Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/html_viewer/html_frame.cc ('k') | components/html_viewer/html_frame_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1b1829b43ebd11fe9d8b39428e4f8a9d294d88ea..e9bbaf457707ffcf72d2f9d30cefd0236445e996 100644
--- a/components/html_viewer/html_frame_apptest.cc
+++ b/components/html_viewer/html_frame_apptest.cc
@@ -28,7 +28,6 @@
#include "components/web_view/public/interfaces/frame.mojom.h"
#include "components/web_view/test_frame_tree_delegate.h"
#include "mojo/services/accessibility/public/interfaces/accessibility.mojom.h"
-#include "mojo/shell/public/cpp/application_impl.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
using mus::mojom::WindowTreeClientPtr;
@@ -89,8 +88,8 @@ scoped_ptr<base::Value> ExecuteScript(ApplicationConnection* connection,
// FrameTreeDelegate that can block waiting for navigation to start.
class TestFrameTreeDelegateImpl : public web_view::TestFrameTreeDelegate {
public:
- explicit TestFrameTreeDelegateImpl(mojo::ApplicationImpl* app)
- : TestFrameTreeDelegate(app), frame_tree_(nullptr) {}
+ explicit TestFrameTreeDelegateImpl(mojo::Shell* shell)
+ : TestFrameTreeDelegate(shell), frame_tree_(nullptr) {}
~TestFrameTreeDelegateImpl() override {}
void set_frame_tree(FrameTree* frame_tree) { frame_tree_ = frame_tree; }
@@ -176,8 +175,7 @@ class HTMLFrameTest : public WindowServerTestBase {
// script) a frame showing the same empty page.
Frame* LoadEmptyPageAndCreateFrame() {
mus::Window* embed_window = window_manager()->NewWindow();
- frame_tree_delegate_.reset(
- new TestFrameTreeDelegateImpl(application_impl()));
+ frame_tree_delegate_.reset(new TestFrameTreeDelegateImpl(shell()));
FrameConnection* root_connection = InitFrameTree(
embed_window, "http://127.0.0.1:%u/empty_page2.html");
if (!root_connection) {
@@ -221,12 +219,11 @@ class HTMLFrameTest : public WindowServerTestBase {
FrameConnection* InitFrameTree(mus::Window* view,
const std::string& url_string) {
- frame_tree_delegate_.reset(
- new TestFrameTreeDelegateImpl(application_impl()));
+ frame_tree_delegate_.reset(new TestFrameTreeDelegateImpl(shell()));
scoped_ptr<FrameConnection> frame_connection(new FrameConnection);
bool got_callback = false;
frame_connection->Init(
- application_impl(), BuildRequestForURL(url_string),
+ shell(), BuildRequestForURL(url_string),
base::Bind(&OnGotContentHandlerForRoot, &got_callback));
ignore_result(WindowServerTestBase::DoRunLoopWithTimeout());
if (!got_callback)
« no previous file with comments | « components/html_viewer/html_frame.cc ('k') | components/html_viewer/html_frame_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698