| 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 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 and resets the | 524 // Change the bluetooth test data while running a layout test and resets the |
| 525 // chooser to accept the first device. | 525 // chooser to accept the first device. |
| 526 void SetBluetoothMockDataSet(const std::string& name); | 526 void SetBluetoothMockDataSet(const std::string& name); |
| 527 | 527 |
| 528 // Makes the Bluetooth chooser record its input and wait for instructions from | 528 // Makes the Bluetooth chooser record its input and wait for instructions from |
| 529 // the test program on how to proceed. | 529 // the test program on how to proceed. |
| 530 void SetBluetoothManualChooser(); | 530 void SetBluetoothManualChooser(); |
| 531 | 531 |
| 532 // Returns the events recorded since the last call to this function. | 532 // Calls |callback| with a DOMString[] representing the events recorded since |
| 533 std::vector<std::string> GetBluetoothManualChooserEvents(); | 533 // the last call to this function. |
| 534 void GetBluetoothManualChooserEvents(v8::Local<v8::Function> callback); |
| 534 | 535 |
| 535 // Calls the BluetoothChooser::EventHandler with the arguments here. Valid | 536 // Calls the BluetoothChooser::EventHandler with the arguments here. Valid |
| 536 // event strings are: | 537 // event strings are: |
| 537 // * "cancel" - simulates the user canceling the chooser. | 538 // * "cancel" - simulates the user canceling the chooser. |
| 538 // * "select" - simulates the user selecting a device whose device ID is in | 539 // * "select" - simulates the user selecting a device whose device ID is in |
| 539 // |argument|. | 540 // |argument|. |
| 540 void SendBluetoothManualChooserEvent(const std::string& event, | 541 void SendBluetoothManualChooserEvent(const std::string& event, |
| 541 const std::string& argument); | 542 const std::string& argument); |
| 542 | 543 |
| 543 // Enables mock geofencing service while running a layout test. | 544 // Enables mock geofencing service while running a layout test. |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 616 /////////////////////////////////////////////////////////////////////////// | 617 /////////////////////////////////////////////////////////////////////////// |
| 617 // Internal helpers | 618 // Internal helpers |
| 618 | 619 |
| 619 void GetManifestCallback(scoped_ptr<InvokeCallbackTask> task, | 620 void GetManifestCallback(scoped_ptr<InvokeCallbackTask> task, |
| 620 const blink::WebURLResponse& response, | 621 const blink::WebURLResponse& response, |
| 621 const std::string& data); | 622 const std::string& data); |
| 622 void CapturePixelsCallback(scoped_ptr<InvokeCallbackTask> task, | 623 void CapturePixelsCallback(scoped_ptr<InvokeCallbackTask> task, |
| 623 const SkBitmap& snapshot); | 624 const SkBitmap& snapshot); |
| 624 void DispatchBeforeInstallPromptCallback(scoped_ptr<InvokeCallbackTask> task, | 625 void DispatchBeforeInstallPromptCallback(scoped_ptr<InvokeCallbackTask> task, |
| 625 bool canceled); | 626 bool canceled); |
| 627 void GetBluetoothManualChooserEventsCallback( |
| 628 scoped_ptr<InvokeCallbackTask> task, |
| 629 const std::vector<std::string>& events); |
| 626 | 630 |
| 627 void CheckResponseMimeType(); | 631 void CheckResponseMimeType(); |
| 628 void CompleteNotifyDone(); | 632 void CompleteNotifyDone(); |
| 629 | 633 |
| 630 void DidAcquirePointerLockInternal(); | 634 void DidAcquirePointerLockInternal(); |
| 631 void DidNotAcquirePointerLockInternal(); | 635 void DidNotAcquirePointerLockInternal(); |
| 632 void DidLosePointerLockInternal(); | 636 void DidLosePointerLockInternal(); |
| 633 | 637 |
| 634 // In the Mac code, this is called to trigger the end of a test after the | 638 // In the Mac code, this is called to trigger the end of a test after the |
| 635 // page has finished loading. From here, we can generate the dump for the | 639 // page has finished loading. From here, we can generate the dump for the |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 833 bool use_mock_theme_; | 837 bool use_mock_theme_; |
| 834 | 838 |
| 835 base::WeakPtrFactory<TestRunner> weak_factory_; | 839 base::WeakPtrFactory<TestRunner> weak_factory_; |
| 836 | 840 |
| 837 DISALLOW_COPY_AND_ASSIGN(TestRunner); | 841 DISALLOW_COPY_AND_ASSIGN(TestRunner); |
| 838 }; | 842 }; |
| 839 | 843 |
| 840 } // namespace test_runner | 844 } // namespace test_runner |
| 841 | 845 |
| 842 #endif // COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ | 846 #endif // COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ |
| OLD | NEW |