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 <deque> | 8 #include <deque> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 // Converts a URL starting with file:///tmp/ to the local mapping. | 514 // Converts a URL starting with file:///tmp/ to the local mapping. |
515 std::string PathToLocalResource(const std::string& path); | 515 std::string PathToLocalResource(const std::string& path); |
516 | 516 |
517 // Used to set the device scale factor. | 517 // Used to set the device scale factor. |
518 void SetBackingScaleFactor(double value, v8::Local<v8::Function> callback); | 518 void SetBackingScaleFactor(double value, v8::Local<v8::Function> callback); |
519 | 519 |
520 // Change the device color profile while running a layout test. | 520 // Change the device color profile while running a layout test. |
521 void SetColorProfile(const std::string& name, | 521 void SetColorProfile(const std::string& name, |
522 v8::Local<v8::Function> callback); | 522 v8::Local<v8::Function> callback); |
523 | 523 |
524 // Change the bluetooth test data while running a layout test. | 524 // Change the bluetooth test data while running a layout test and resets the |
| 525 // chooser to accept the first device. |
525 void SetBluetoothMockDataSet(const std::string& name); | 526 void SetBluetoothMockDataSet(const std::string& name); |
526 | 527 |
| 528 // Makes the Bluetooth chooser record its input and wait for instructions from |
| 529 // the test program on how to proceed. |
| 530 void SetBluetoothManualChooser(); |
| 531 |
| 532 // Returns the events recorded since the last call to this function. |
| 533 std::vector<std::string> GetBluetoothManualChooserEvents(); |
| 534 |
| 535 // Calls the BluetoothChooser::EventHandler with the arguments here. Valid |
| 536 // event strings are: |
| 537 // * "cancel" - simulates the user canceling the chooser. |
| 538 // * "select" - simulates the user selecting a device whose device ID is in |
| 539 // |argument|. |
| 540 void SendBluetoothManualChooserEvent(const std::string& event, |
| 541 const std::string& argument); |
| 542 |
527 // Enables mock geofencing service while running a layout test. | 543 // Enables mock geofencing service while running a layout test. |
528 // |service_available| indicates if the mock service should mock geofencing | 544 // |service_available| indicates if the mock service should mock geofencing |
529 // being available or not. | 545 // being available or not. |
530 void SetGeofencingMockProvider(bool service_available); | 546 void SetGeofencingMockProvider(bool service_available); |
531 | 547 |
532 // Disables mock geofencing service while running a layout test. | 548 // Disables mock geofencing service while running a layout test. |
533 void ClearGeofencingMockProvider(); | 549 void ClearGeofencingMockProvider(); |
534 | 550 |
535 // Set the mock geofencing position while running a layout test. | 551 // Set the mock geofencing position while running a layout test. |
536 void SetGeofencingMockPosition(double latitude, double longitude); | 552 void SetGeofencingMockPosition(double latitude, double longitude); |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
817 bool use_mock_theme_; | 833 bool use_mock_theme_; |
818 | 834 |
819 base::WeakPtrFactory<TestRunner> weak_factory_; | 835 base::WeakPtrFactory<TestRunner> weak_factory_; |
820 | 836 |
821 DISALLOW_COPY_AND_ASSIGN(TestRunner); | 837 DISALLOW_COPY_AND_ASSIGN(TestRunner); |
822 }; | 838 }; |
823 | 839 |
824 } // namespace test_runner | 840 } // namespace test_runner |
825 | 841 |
826 #endif // COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ | 842 #endif // COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ |
OLD | NEW |