OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "base/macros.h" | |
6 #include "mandoline/ui/desktop_ui/public/interfaces/launch_handler.mojom.h" | |
7 #include "mojo/shell/public/cpp/application_test_base.h" | |
8 | |
9 namespace mandoline { | |
10 | |
11 class BrowserTest : public mojo::test::ApplicationTestBase { | |
12 public: | |
13 BrowserTest() : ApplicationTestBase() {} | |
14 ~BrowserTest() override {} | |
15 | |
16 // mojo::test::ApplicationTestBase: | |
17 void SetUp() override { | |
18 mojo::test::ApplicationTestBase::SetUp(); | |
19 shell()->ConnectToService("mojo:desktop_ui", &launch_handler_); | |
20 ASSERT_TRUE(launch_handler_.is_bound()); | |
21 } | |
22 | |
23 protected: | |
24 LaunchHandlerPtr launch_handler_; | |
25 | |
26 private: | |
27 MOJO_DISALLOW_COPY_AND_ASSIGN(BrowserTest); | |
28 }; | |
29 | |
30 // A simple sanity check for connecting to the LaunchHandler. | |
31 TEST_F(BrowserTest, LaunchHandlerBasic) { | |
32 ASSERT_TRUE(launch_handler_.is_bound()); | |
33 launch_handler_->LaunchURL(mojo::String::From("data:text/html,foo")); | |
34 EXPECT_TRUE(launch_handler_.is_bound()); | |
35 } | |
36 | |
37 } // namespace mandoline | |
OLD | NEW |