| 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> |
| 11 #include <memory> | 11 #include <memory> |
| 12 #include <set> | 12 #include <set> |
| 13 #include <string> | 13 #include <string> |
| 14 #include <vector> | 14 #include <vector> |
| 15 | 15 |
| 16 #include "base/macros.h" | 16 #include "base/macros.h" |
| 17 #include "base/memory/weak_ptr.h" | 17 #include "base/memory/weak_ptr.h" |
| 18 #include "components/test_runner/layout_test_runtime_flags.h" | 18 #include "components/test_runner/layout_test_runtime_flags.h" |
| 19 #include "components/test_runner/test_runner_export.h" | 19 #include "components/test_runner/test_runner_export.h" |
| 20 #include "components/test_runner/web_test_runner.h" | 20 #include "components/test_runner/web_test_runner.h" |
| 21 #include "media/midi/midi_service.mojom.h" |
| 21 #include "third_party/WebKit/public/platform/WebEffectiveConnectionType.h" | 22 #include "third_party/WebKit/public/platform/WebEffectiveConnectionType.h" |
| 22 #include "third_party/WebKit/public/platform/WebImage.h" | 23 #include "third_party/WebKit/public/platform/WebImage.h" |
| 23 #include "v8/include/v8.h" | 24 #include "v8/include/v8.h" |
| 24 | 25 |
| 25 class GURL; | 26 class GURL; |
| 26 class SkBitmap; | 27 class SkBitmap; |
| 27 | 28 |
| 28 namespace blink { | 29 namespace blink { |
| 29 class WebContentSettingsClient; | 30 class WebContentSettingsClient; |
| 30 class WebFrame; | 31 class WebFrame; |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 | 155 |
| 155 blink::WebFrame* topLoadingFrame() const; | 156 blink::WebFrame* topLoadingFrame() const; |
| 156 void policyDelegateDone(); | 157 void policyDelegateDone(); |
| 157 bool policyDelegateEnabled() const; | 158 bool policyDelegateEnabled() const; |
| 158 bool policyDelegateIsPermissive() const; | 159 bool policyDelegateIsPermissive() const; |
| 159 bool policyDelegateShouldNotifyDone() const; | 160 bool policyDelegateShouldNotifyDone() const; |
| 160 void setToolTipText(const blink::WebString&); | 161 void setToolTipText(const blink::WebString&); |
| 161 void setDragImage(const blink::WebImage& drag_image); | 162 void setDragImage(const blink::WebImage& drag_image); |
| 162 bool shouldDumpNavigationPolicy() const; | 163 bool shouldDumpNavigationPolicy() const; |
| 163 | 164 |
| 164 bool midiAccessorResult(); | 165 midi::mojom::Result midiAccessorResult(); |
| 165 | 166 |
| 166 // Methods used by MockColorChooser: | 167 // Methods used by MockColorChooser: |
| 167 void DidOpenChooser(); | 168 void DidOpenChooser(); |
| 168 void DidCloseChooser(); | 169 void DidCloseChooser(); |
| 169 | 170 |
| 170 bool ShouldDumpConsoleMessages() const; | 171 bool ShouldDumpConsoleMessages() const; |
| 171 | 172 |
| 172 blink::WebEffectiveConnectionType effective_connection_type() const { | 173 blink::WebEffectiveConnectionType effective_connection_type() const { |
| 173 return effective_connection_type_; | 174 return effective_connection_type_; |
| 174 } | 175 } |
| (...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 | 520 |
| 520 // Resolve the beforeinstallprompt event with the matching request id. | 521 // Resolve the beforeinstallprompt event with the matching request id. |
| 521 void ResolveBeforeInstallPromptPromise(int request_id, | 522 void ResolveBeforeInstallPromptPromise(int request_id, |
| 522 const std::string& platform); | 523 const std::string& platform); |
| 523 | 524 |
| 524 // Calls setlocale(LC_ALL, ...) for a specified locale. | 525 // Calls setlocale(LC_ALL, ...) for a specified locale. |
| 525 // Resets between tests. | 526 // Resets between tests. |
| 526 void SetPOSIXLocale(const std::string& locale); | 527 void SetPOSIXLocale(const std::string& locale); |
| 527 | 528 |
| 528 // MIDI function to control permission handling. | 529 // MIDI function to control permission handling. |
| 529 void SetMIDIAccessorResult(bool result); | 530 void SetMIDIAccessorResult(midi::mojom::Result result); |
| 530 | 531 |
| 531 // Simulates a click on a Web Notification. | 532 // Simulates a click on a Web Notification. |
| 532 void SimulateWebNotificationClick(const std::string& title, int action_index); | 533 void SimulateWebNotificationClick(const std::string& title, int action_index); |
| 533 | 534 |
| 534 // Simulates closing a Web Notification. | 535 // Simulates closing a Web Notification. |
| 535 void SimulateWebNotificationClose(const std::string& title, bool by_user); | 536 void SimulateWebNotificationClose(const std::string& title, bool by_user); |
| 536 | 537 |
| 537 // Speech recognition related functions. | 538 // Speech recognition related functions. |
| 538 void AddMockSpeechRecognitionResult(const std::string& transcript, | 539 void AddMockSpeechRecognitionResult(const std::string& transcript, |
| 539 double confidence); | 540 double confidence); |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 594 bool dump_back_forward_list_; | 595 bool dump_back_forward_list_; |
| 595 | 596 |
| 596 // If true, pixel dump will be produced as a series of 1px-tall, view-wide | 597 // If true, pixel dump will be produced as a series of 1px-tall, view-wide |
| 597 // individual paints over the height of the view. | 598 // individual paints over the height of the view. |
| 598 bool test_repaint_; | 599 bool test_repaint_; |
| 599 | 600 |
| 600 // If true and test_repaint_ is true as well, pixel dump will be produced as | 601 // If true and test_repaint_ is true as well, pixel dump will be produced as |
| 601 // a series of 1px-wide, view-tall paints across the width of the view. | 602 // a series of 1px-wide, view-tall paints across the width of the view. |
| 602 bool sweep_horizontally_; | 603 bool sweep_horizontally_; |
| 603 | 604 |
| 604 // If false, MockWebMIDIAccessor fails on startSession() for testing. | 605 // startSession() result of MockWebMIDIAccessor for testing. |
| 605 bool midi_accessor_result_; | 606 midi::mojom::Result midi_accessor_result_; |
| 606 | 607 |
| 607 bool has_custom_text_output_; | 608 bool has_custom_text_output_; |
| 608 std::string custom_text_output_; | 609 std::string custom_text_output_; |
| 609 | 610 |
| 610 std::set<std::string> http_headers_to_clear_; | 611 std::set<std::string> http_headers_to_clear_; |
| 611 | 612 |
| 612 // WAV audio data is stored here. | 613 // WAV audio data is stored here. |
| 613 std::vector<unsigned char> audio_data_; | 614 std::vector<unsigned char> audio_data_; |
| 614 | 615 |
| 615 TestInterfaces* test_interfaces_; | 616 TestInterfaces* test_interfaces_; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 656 blink::WebEffectiveConnectionType effective_connection_type_; | 657 blink::WebEffectiveConnectionType effective_connection_type_; |
| 657 | 658 |
| 658 base::WeakPtrFactory<TestRunner> weak_factory_; | 659 base::WeakPtrFactory<TestRunner> weak_factory_; |
| 659 | 660 |
| 660 DISALLOW_COPY_AND_ASSIGN(TestRunner); | 661 DISALLOW_COPY_AND_ASSIGN(TestRunner); |
| 661 }; | 662 }; |
| 662 | 663 |
| 663 } // namespace test_runner | 664 } // namespace test_runner |
| 664 | 665 |
| 665 #endif // COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ | 666 #endif // COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ |
| OLD | NEW |