| OLD | NEW |
| 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 #ifndef SKY_SHELL_TESTING_TEST_RUNNER_H_ | 5 #ifndef SKY_SHELL_TESTING_TEST_RUNNER_H_ |
| 6 #define SKY_SHELL_TESTING_TEST_RUNNER_H_ | 6 #define SKY_SHELL_TESTING_TEST_RUNNER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
| 12 #include "mojo/common/weak_binding_set.h" | 12 #include "mojo/common/weak_binding_set.h" |
| 13 #include "mojo/public/cpp/application/interface_factory_impl.h" | 13 #include "mojo/public/cpp/application/interface_factory_impl.h" |
| 14 #include "sky/services/engine/sky_engine.mojom.h" |
| 14 #include "sky/services/testing/test_harness.mojom.h" | 15 #include "sky/services/testing/test_harness.mojom.h" |
| 15 #include "sky/services/viewport/viewport_observer.mojom.h" | |
| 16 | 16 |
| 17 namespace sky { | 17 namespace sky { |
| 18 namespace shell { | 18 namespace shell { |
| 19 class ShellView; | 19 class ShellView; |
| 20 | 20 |
| 21 class TestRunner : public mojo::InterfaceFactory<TestHarness>, | 21 class TestRunner : public mojo::InterfaceFactory<TestHarness>, |
| 22 public TestHarness { | 22 public TestHarness { |
| 23 public: | 23 public: |
| 24 static TestRunner& Shared(); | 24 static TestRunner& Shared(); |
| 25 | 25 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 39 const mojo::Array<uint8_t> pixels) override; | 39 const mojo::Array<uint8_t> pixels) override; |
| 40 void DispatchInputEvent(mojo::EventPtr event) override; | 40 void DispatchInputEvent(mojo::EventPtr event) override; |
| 41 | 41 |
| 42 TestRunner(); | 42 TestRunner(); |
| 43 ~TestRunner() override; | 43 ~TestRunner() override; |
| 44 void ScheduleRun(); | 44 void ScheduleRun(); |
| 45 void Run(); | 45 void Run(); |
| 46 | 46 |
| 47 std::string package_root_; | 47 std::string package_root_; |
| 48 scoped_ptr<ShellView> shell_view_; | 48 scoped_ptr<ShellView> shell_view_; |
| 49 ViewportObserverPtr viewport_observer_; | 49 SkyEnginePtr sky_engine_; |
| 50 | 50 |
| 51 std::string single_test_url_; | 51 std::string single_test_url_; |
| 52 mojo::WeakBindingSet<TestHarness> bindings_; | 52 mojo::WeakBindingSet<TestHarness> bindings_; |
| 53 | 53 |
| 54 base::WeakPtrFactory<TestRunner> weak_ptr_factory_; | 54 base::WeakPtrFactory<TestRunner> weak_ptr_factory_; |
| 55 | 55 |
| 56 DISALLOW_COPY_AND_ASSIGN(TestRunner); | 56 DISALLOW_COPY_AND_ASSIGN(TestRunner); |
| 57 }; | 57 }; |
| 58 | 58 |
| 59 } // namespace shell | 59 } // namespace shell |
| 60 } // namespace sky | 60 } // namespace sky |
| 61 | 61 |
| 62 #endif // SKY_SHELL_TESTING_TEST_RUNNER_H_ | 62 #endif // SKY_SHELL_TESTING_TEST_RUNNER_H_ |
| OLD | NEW |