| 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 void setDragImage(const blink::WebImage& drag_image); | 166 void setDragImage(const blink::WebImage& drag_image); |
| 167 bool shouldDumpNavigationPolicy() const; | 167 bool shouldDumpNavigationPolicy() const; |
| 168 | 168 |
| 169 midi::mojom::Result midiAccessorResult(); | 169 midi::mojom::Result midiAccessorResult(); |
| 170 | 170 |
| 171 // Methods used by MockColorChooser: | 171 // Methods used by MockColorChooser: |
| 172 void DidOpenChooser(); | 172 void DidOpenChooser(); |
| 173 void DidCloseChooser(); | 173 void DidCloseChooser(); |
| 174 | 174 |
| 175 bool ShouldDumpConsoleMessages() const; | 175 bool ShouldDumpConsoleMessages() const; |
| 176 bool ShouldDumpJavaScriptDialogs() const; |
| 176 | 177 |
| 177 blink::WebEffectiveConnectionType effective_connection_type() const { | 178 blink::WebEffectiveConnectionType effective_connection_type() const { |
| 178 return effective_connection_type_; | 179 return effective_connection_type_; |
| 179 } | 180 } |
| 180 | 181 |
| 181 // A single item in the work queue. | 182 // A single item in the work queue. |
| 182 class WorkItem { | 183 class WorkItem { |
| 183 public: | 184 public: |
| 184 virtual ~WorkItem() {} | 185 virtual ~WorkItem() {} |
| 185 | 186 |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 void DumpDragImage(); | 466 void DumpDragImage(); |
| 466 | 467 |
| 467 // Sets a flag that tells the WebViewTestProxy to dump the default navigation | 468 // Sets a flag that tells the WebViewTestProxy to dump the default navigation |
| 468 // policy passed to the decidePolicyForNavigation callback. | 469 // policy passed to the decidePolicyForNavigation callback. |
| 469 void DumpNavigationPolicy(); | 470 void DumpNavigationPolicy(); |
| 470 | 471 |
| 471 // Controls whether console messages produced by the page are dumped | 472 // Controls whether console messages produced by the page are dumped |
| 472 // to test output. | 473 // to test output. |
| 473 void SetDumpConsoleMessages(bool value); | 474 void SetDumpConsoleMessages(bool value); |
| 474 | 475 |
| 476 // Controls whether JavaScript dialogs such as alert() are dumped to test |
| 477 // output. |
| 478 void SetDumpJavaScriptDialogs(bool value); |
| 479 |
| 475 // Overrides the NetworkQualityEstimator's estimated network type. If |type| | 480 // Overrides the NetworkQualityEstimator's estimated network type. If |type| |
| 476 // is TypeUnknown the NQE's value is used. Be sure to call this with | 481 // is TypeUnknown the NQE's value is used. Be sure to call this with |
| 477 // TypeUnknown at the end of your test if you use this. | 482 // TypeUnknown at the end of your test if you use this. |
| 478 void SetEffectiveConnectionType( | 483 void SetEffectiveConnectionType( |
| 479 blink::WebEffectiveConnectionType connection_type); | 484 blink::WebEffectiveConnectionType connection_type); |
| 480 | 485 |
| 481 // Controls whether the mock spell checker is enabled. | 486 // Controls whether the mock spell checker is enabled. |
| 482 void SetMockSpellCheckerEnabled(bool enabled); | 487 void SetMockSpellCheckerEnabled(bool enabled); |
| 483 | 488 |
| 484 /////////////////////////////////////////////////////////////////////////// | 489 /////////////////////////////////////////////////////////////////////////// |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 662 blink::WebEffectiveConnectionType effective_connection_type_; | 667 blink::WebEffectiveConnectionType effective_connection_type_; |
| 663 | 668 |
| 664 base::WeakPtrFactory<TestRunner> weak_factory_; | 669 base::WeakPtrFactory<TestRunner> weak_factory_; |
| 665 | 670 |
| 666 DISALLOW_COPY_AND_ASSIGN(TestRunner); | 671 DISALLOW_COPY_AND_ASSIGN(TestRunner); |
| 667 }; | 672 }; |
| 668 | 673 |
| 669 } // namespace test_runner | 674 } // namespace test_runner |
| 670 | 675 |
| 671 #endif // COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ | 676 #endif // COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ |
| OLD | NEW |