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

Unified Diff: content/browser/mojo_shell_browsertest.cc

Issue 1889253002: Remove uses of shell::Loader from content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « content/browser/mojo/mojo_shell_context.cc ('k') | content/browser/webui/web_ui_mojo_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/mojo_shell_browsertest.cc
diff --git a/content/browser/mojo_shell_browsertest.cc b/content/browser/mojo_shell_browsertest.cc
deleted file mode 100644
index 26811e01bd78f39f1980416c24a2a951dcaa6e1f..0000000000000000000000000000000000000000
--- a/content/browser/mojo_shell_browsertest.cc
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <memory>
-
-#include "base/bind.h"
-#include "base/macros.h"
-#include "base/run_loop.h"
-#include "content/browser/mojo/mojo_shell_context.h"
-#include "content/public/browser/browser_context.h"
-#include "content/public/browser/mojo_app_connection.h"
-#include "content/public/browser/web_contents.h"
-#include "content/public/test/content_browser_test.h"
-#include "content/public/test/test_mojo_app.h"
-#include "content/public/test/test_mojo_service.mojom.h"
-#include "content/shell/browser/shell.h"
-#include "url/gurl.h"
-
-namespace content {
-
-const char kInProcessTestMojoAppName[] = "system:content_in_process_test_app";
-
-class MojoShellTest : public ContentBrowserTest {
- public:
- MojoShellTest() {
- test_apps_[kInProcessTestMojoAppName] = base::Bind(&CreateTestApp);
- MojoShellContext::SetApplicationsForTest(&test_apps_);
- }
-
- protected:
- std::string GetUserId() {
- return BrowserContext::GetMojoUserIdFor(
- shell()->web_contents()->GetBrowserContext());
- }
-
- private:
- static std::unique_ptr<shell::ShellClient> CreateTestApp() {
- return std::unique_ptr<shell::ShellClient>(new TestMojoApp);
- }
-
- MojoShellContext::StaticApplicationMap test_apps_;
-
- DISALLOW_COPY_AND_ASSIGN(MojoShellTest);
-};
-
-IN_PROC_BROWSER_TEST_F(MojoShellTest, TestBrowserConnection) {
- auto test_app = MojoAppConnection::Create(
- GetUserId(), kInProcessTestMojoAppName, kBrowserMojoAppUrl);
- mojom::TestMojoServicePtr test_service;
- test_app->GetInterface(&test_service);
-
- base::RunLoop run_loop;
- test_service->DoSomething(run_loop.QuitClosure());
- run_loop.Run();
-}
-
-IN_PROC_BROWSER_TEST_F(MojoShellTest, TestUtilityConnection) {
- // With no loader registered at this URL, the shell should spawn a utility
- // process and connect us to it. content_shell's utility process always hosts
- // a TestMojoApp at |kTestMojoAppUrl|.
- auto test_app = MojoAppConnection::Create(GetUserId(), kTestMojoAppUrl,
- kBrowserMojoAppUrl);
- mojom::TestMojoServicePtr test_service;
- test_app->GetInterface(&test_service);
-
- base::RunLoop run_loop;
- test_service->DoSomething(run_loop.QuitClosure());
- run_loop.Run();
-}
-
-} // namespace content
« no previous file with comments | « content/browser/mojo/mojo_shell_context.cc ('k') | content/browser/webui/web_ui_mojo_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698