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

Side by Side Diff: mandoline/ui/desktop_ui/browser_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 unified diff | Download patch
« no previous file with comments | « mandoline/services/updater/updater_impl.cc ('k') | mandoline/ui/desktop_ui/browser_manager.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/macros.h" 5 #include "base/macros.h"
6 #include "mandoline/ui/desktop_ui/public/interfaces/launch_handler.mojom.h" 6 #include "mandoline/ui/desktop_ui/public/interfaces/launch_handler.mojom.h"
7 #include "mojo/shell/public/cpp/application_impl.h"
8 #include "mojo/shell/public/cpp/application_test_base.h" 7 #include "mojo/shell/public/cpp/application_test_base.h"
9 8
10 namespace mandoline { 9 namespace mandoline {
11 10
12 class BrowserTest : public mojo::test::ApplicationTestBase { 11 class BrowserTest : public mojo::test::ApplicationTestBase {
13 public: 12 public:
14 BrowserTest() : ApplicationTestBase() {} 13 BrowserTest() : ApplicationTestBase() {}
15 ~BrowserTest() override {} 14 ~BrowserTest() override {}
16 15
17 // mojo::test::ApplicationTestBase: 16 // mojo::test::ApplicationTestBase:
18 void SetUp() override { 17 void SetUp() override {
19 mojo::test::ApplicationTestBase::SetUp(); 18 mojo::test::ApplicationTestBase::SetUp();
20 application_impl()->ConnectToService("mojo:desktop_ui", &launch_handler_); 19 shell()->ConnectToService("mojo:desktop_ui", &launch_handler_);
21 ASSERT_TRUE(launch_handler_.is_bound()); 20 ASSERT_TRUE(launch_handler_.is_bound());
22 } 21 }
23 22
24 protected: 23 protected:
25 LaunchHandlerPtr launch_handler_; 24 LaunchHandlerPtr launch_handler_;
26 25
27 private: 26 private:
28 MOJO_DISALLOW_COPY_AND_ASSIGN(BrowserTest); 27 MOJO_DISALLOW_COPY_AND_ASSIGN(BrowserTest);
29 }; 28 };
30 29
31 // A simple sanity check for connecting to the LaunchHandler. 30 // A simple sanity check for connecting to the LaunchHandler.
32 TEST_F(BrowserTest, LaunchHandlerBasic) { 31 TEST_F(BrowserTest, LaunchHandlerBasic) {
33 ASSERT_TRUE(launch_handler_.is_bound()); 32 ASSERT_TRUE(launch_handler_.is_bound());
34 launch_handler_->LaunchURL(mojo::String::From("data:text/html,foo")); 33 launch_handler_->LaunchURL(mojo::String::From("data:text/html,foo"));
35 EXPECT_TRUE(launch_handler_.is_bound()); 34 EXPECT_TRUE(launch_handler_.is_bound());
36 } 35 }
37 36
38 } // namespace mandoline 37 } // namespace mandoline
OLDNEW
« no previous file with comments | « mandoline/services/updater/updater_impl.cc ('k') | mandoline/ui/desktop_ui/browser_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698