OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ | 5 #ifndef COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ |
6 #define COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ | 6 #define COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <deque> | 10 #include <deque> |
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
571 // Causes the beforeinstallprompt event to be sent to the renderer. | 571 // Causes the beforeinstallprompt event to be sent to the renderer. |
572 void DispatchBeforeInstallPromptEvent( | 572 void DispatchBeforeInstallPromptEvent( |
573 int request_id, | 573 int request_id, |
574 const std::vector<std::string>& event_platforms, | 574 const std::vector<std::string>& event_platforms, |
575 v8::Local<v8::Function> callback); | 575 v8::Local<v8::Function> callback); |
576 | 576 |
577 // Resolve the beforeinstallprompt event with the matching request id. | 577 // Resolve the beforeinstallprompt event with the matching request id. |
578 void ResolveBeforeInstallPromptPromise(int request_id, | 578 void ResolveBeforeInstallPromptPromise(int request_id, |
579 const std::string& platform); | 579 const std::string& platform); |
580 | 580 |
| 581 // Immediately run all pending idle tasks, including all pending |
| 582 // requestIdleCallback calls. Invoke the callback when all |
| 583 // idle tasks are complete. |
| 584 void RunIdleTasks(v8::Local<v8::Function> callback); |
| 585 |
581 // Calls setlocale(LC_ALL, ...) for a specified locale. | 586 // Calls setlocale(LC_ALL, ...) for a specified locale. |
582 // Resets between tests. | 587 // Resets between tests. |
583 void SetPOSIXLocale(const std::string& locale); | 588 void SetPOSIXLocale(const std::string& locale); |
584 | 589 |
585 // MIDI function to control permission handling. | 590 // MIDI function to control permission handling. |
586 void SetMIDIAccessorResult(bool result); | 591 void SetMIDIAccessorResult(bool result); |
587 | 592 |
588 // Simulates a click on a Web Notification. | 593 // Simulates a click on a Web Notification. |
589 void SimulateWebNotificationClick(const std::string& title, int action_index); | 594 void SimulateWebNotificationClick(const std::string& title, int action_index); |
590 | 595 |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
818 scoped_ptr<MockScreenOrientationClient> mock_screen_orientation_client_; | 823 scoped_ptr<MockScreenOrientationClient> mock_screen_orientation_client_; |
819 | 824 |
820 base::WeakPtrFactory<TestRunner> weak_factory_; | 825 base::WeakPtrFactory<TestRunner> weak_factory_; |
821 | 826 |
822 DISALLOW_COPY_AND_ASSIGN(TestRunner); | 827 DISALLOW_COPY_AND_ASSIGN(TestRunner); |
823 }; | 828 }; |
824 | 829 |
825 } // namespace test_runner | 830 } // namespace test_runner |
826 | 831 |
827 #endif // COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ | 832 #endif // COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ |
OLD | NEW |