OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 "services/ui/gpu/gpu_service.h" | 5 #include "services/ui/gpu/gpu_service.h" |
6 | 6 |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
11 #include "base/run_loop.h" | 11 #include "base/run_loop.h" |
| 12 #include "base/single_thread_task_runner.h" |
12 #include "gpu/config/gpu_info.h" | 13 #include "gpu/config/gpu_info.h" |
13 #include "gpu/ipc/service/gpu_watchdog_thread.h" | 14 #include "gpu/ipc/service/gpu_watchdog_thread.h" |
14 #include "services/ui/public/interfaces/gpu.mojom.h" | 15 #include "services/ui/public/interfaces/gpu.mojom.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
16 | 17 |
17 namespace ui { | 18 namespace ui { |
18 namespace test { | 19 namespace test { |
19 | 20 |
20 class GpuServiceTest : public testing::Test { | 21 class GpuServiceTest : public testing::Test { |
21 public: | 22 public: |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 base::WaitableEvent wait(base::WaitableEvent::ResetPolicy::MANUAL, | 89 base::WaitableEvent wait(base::WaitableEvent::ResetPolicy::MANUAL, |
89 base::WaitableEvent::InitialState::NOT_SIGNALED); | 90 base::WaitableEvent::InitialState::NOT_SIGNALED); |
90 io_runner()->PostTask(FROM_HERE, base::Bind(&base::WaitableEvent::Signal, | 91 io_runner()->PostTask(FROM_HERE, base::Bind(&base::WaitableEvent::Signal, |
91 base::Unretained(&wait))); | 92 base::Unretained(&wait))); |
92 wait.Wait(); | 93 wait.Wait(); |
93 DestroyService(); | 94 DestroyService(); |
94 } | 95 } |
95 | 96 |
96 } // namespace test | 97 } // namespace test |
97 } // namespace ui | 98 } // namespace ui |
OLD | NEW |