| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/files/file_path.h" | 5 #include "base/files/file_path.h" |
| 6 #include "base/path_service.h" | 6 #include "base/path_service.h" |
| 7 #include "gin/modules/module_registry.h" | 7 #include "gin/modules/module_registry.h" |
| 8 #include "gin/modules/timer.h" | 8 #include "gin/modules/timer.h" |
| 9 #include "gin/test/file_runner.h" | 9 #include "gin/test/file_runner.h" |
| 10 #include "gin/test/gtest.h" | 10 #include "gin/test/gtest.h" |
| 11 #include "mojo/edk/js/threading.h" | |
| 12 #include "services/js/modules/clock/monotonic_clock.h" | 11 #include "services/js/modules/clock/monotonic_clock.h" |
| 12 #include "services/js/system/threading.h" |
| 13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 14 | 14 |
| 15 namespace js { | 15 namespace js { |
| 16 namespace { | 16 namespace { |
| 17 | 17 |
| 18 class TestRunnerDelegate : public gin::FileRunnerDelegate { | 18 class TestRunnerDelegate : public gin::FileRunnerDelegate { |
| 19 public: | 19 public: |
| 20 TestRunnerDelegate() { | 20 TestRunnerDelegate() { |
| 21 AddBuiltinModule(gin::TimerModule::kName, gin::TimerModule::GetModule); | 21 AddBuiltinModule(gin::TimerModule::kName, gin::TimerModule::GetModule); |
| 22 AddBuiltinModule(MonotonicClock::kModuleName, MonotonicClock::GetModule); | 22 AddBuiltinModule(MonotonicClock::kModuleName, MonotonicClock::GetModule); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 41 } | 41 } |
| 42 | 42 |
| 43 // TODO(abarth): Should we autogenerate these stubs from GYP? | 43 // TODO(abarth): Should we autogenerate these stubs from GYP? |
| 44 | 44 |
| 45 TEST(JSTest, monotonic_clock) { | 45 TEST(JSTest, monotonic_clock) { |
| 46 RunTest("monotonic_clock_unittests.js", false); | 46 RunTest("monotonic_clock_unittests.js", false); |
| 47 } | 47 } |
| 48 | 48 |
| 49 } // namespace | 49 } // namespace |
| 50 } // namespace js | 50 } // namespace js |
| OLD | NEW |