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

Side by Side Diff: content/browser/mojo_shell_browsertest.cc

Issue 1832813002: Add mojom module suffix in .mojom files in content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Tom's comment 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 unified diff | Download patch
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/macros.h" 6 #include "base/macros.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "content/browser/mojo/mojo_shell_context.h" 9 #include "content/browser/mojo/mojo_shell_context.h"
10 #include "content/public/browser/browser_context.h" 10 #include "content/public/browser/browser_context.h"
(...skipping 28 matching lines...) Expand all
39 } 39 }
40 40
41 MojoShellContext::StaticApplicationMap test_apps_; 41 MojoShellContext::StaticApplicationMap test_apps_;
42 42
43 DISALLOW_COPY_AND_ASSIGN(MojoShellTest); 43 DISALLOW_COPY_AND_ASSIGN(MojoShellTest);
44 }; 44 };
45 45
46 IN_PROC_BROWSER_TEST_F(MojoShellTest, TestBrowserConnection) { 46 IN_PROC_BROWSER_TEST_F(MojoShellTest, TestBrowserConnection) {
47 auto test_app = MojoAppConnection::Create( 47 auto test_app = MojoAppConnection::Create(
48 GetUserId(), kInProcessTestMojoAppName, kBrowserMojoAppUrl); 48 GetUserId(), kInProcessTestMojoAppName, kBrowserMojoAppUrl);
49 TestMojoServicePtr test_service; 49 mojom::TestMojoServicePtr test_service;
50 test_app->GetInterface(&test_service); 50 test_app->GetInterface(&test_service);
51 51
52 base::RunLoop run_loop; 52 base::RunLoop run_loop;
53 test_service->DoSomething(run_loop.QuitClosure()); 53 test_service->DoSomething(run_loop.QuitClosure());
54 run_loop.Run(); 54 run_loop.Run();
55 } 55 }
56 56
57 IN_PROC_BROWSER_TEST_F(MojoShellTest, TestUtilityConnection) { 57 IN_PROC_BROWSER_TEST_F(MojoShellTest, TestUtilityConnection) {
58 // With no loader registered at this URL, the shell should spawn a utility 58 // With no loader registered at this URL, the shell should spawn a utility
59 // process and connect us to it. content_shell's utility process always hosts 59 // process and connect us to it. content_shell's utility process always hosts
60 // a TestMojoApp at |kTestMojoAppUrl|. 60 // a TestMojoApp at |kTestMojoAppUrl|.
61 auto test_app = MojoAppConnection::Create(GetUserId(), kTestMojoAppUrl, 61 auto test_app = MojoAppConnection::Create(GetUserId(), kTestMojoAppUrl,
62 kBrowserMojoAppUrl); 62 kBrowserMojoAppUrl);
63 TestMojoServicePtr test_service; 63 mojom::TestMojoServicePtr test_service;
64 test_app->GetInterface(&test_service); 64 test_app->GetInterface(&test_service);
65 65
66 base::RunLoop run_loop; 66 base::RunLoop run_loop;
67 test_service->DoSomething(run_loop.QuitClosure()); 67 test_service->DoSomething(run_loop.QuitClosure());
68 run_loop.Run(); 68 run_loop.Run();
69 } 69 }
70 70
71 } // namespace content 71 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/media/cdm/browser_cdm_manager.cc ('k') | content/browser/permissions/permission_service_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698