OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
8 #include "mash/quick_launch/public/interfaces/constants.mojom.h" | 8 #include "mash/quick_launch/public/interfaces/constants.mojom.h" |
9 #include "services/service_manager/public/cpp/service_test.h" | 9 #include "services/service_manager/public/cpp/service_test.h" |
10 #include "services/ui/public/interfaces/constants.mojom.h" | 10 #include "services/ui/public/interfaces/constants.mojom.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 private: | 26 private: |
27 void SetUp() override { | 27 void SetUp() override { |
28 base::CommandLine::ForCurrentProcess()->AppendSwitch("use-test-config"); | 28 base::CommandLine::ForCurrentProcess()->AppendSwitch("use-test-config"); |
29 ServiceTest::SetUp(); | 29 ServiceTest::SetUp(); |
30 } | 30 } |
31 | 31 |
32 DISALLOW_COPY_AND_ASSIGN(AppLaunchTest); | 32 DISALLOW_COPY_AND_ASSIGN(AppLaunchTest); |
33 }; | 33 }; |
34 | 34 |
35 // Fails when the Ash material design shelf is enabled by default | 35 TEST_F(AppLaunchTest, TestQuickLaunch) { |
36 // (ash::MaterialDesignController::IsShelfMaterial()). See | |
37 // crbug.com/660194 and crbug.com/642879. | |
38 // TODO(rockot): Reenable this test. | |
39 TEST_F(AppLaunchTest, DISABLED_TestQuickLaunch) { | |
40 connector()->Connect("ash"); | 36 connector()->Connect("ash"); |
41 connector()->Connect(mash::quick_launch::mojom::kServiceName); | 37 connector()->Connect(mash::quick_launch::mojom::kServiceName); |
42 | 38 |
43 ui::mojom::WindowServerTestPtr test_interface; | 39 ui::mojom::WindowServerTestPtr test_interface; |
44 connector()->ConnectToInterface(ui::mojom::kServiceName, &test_interface); | 40 connector()->ConnectToInterface(ui::mojom::kServiceName, &test_interface); |
45 | 41 |
46 base::RunLoop run_loop; | 42 base::RunLoop run_loop; |
47 bool success = false; | 43 bool success = false; |
48 test_interface->EnsureClientHasDrawnWindow( | 44 test_interface->EnsureClientHasDrawnWindow( |
49 mash::quick_launch::mojom::kServiceName, | 45 mash::quick_launch::mojom::kServiceName, |
50 base::Bind(&RunCallback, &success, run_loop.QuitClosure())); | 46 base::Bind(&RunCallback, &success, run_loop.QuitClosure())); |
51 run_loop.Run(); | 47 run_loop.Run(); |
52 EXPECT_TRUE(success); | 48 EXPECT_TRUE(success); |
53 } | 49 } |
54 | 50 |
55 } // namespace mus | 51 } // namespace mus |
56 } // namespace ash | 52 } // namespace ash |
OLD | NEW |