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 CONTENT_SHELL_RENDERER_TEST_RUNNER_TEST_RUNNER_H_ | 5 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_TEST_RUNNER_H_ |
6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_TEST_RUNNER_H_ | 6 #define CONTENT_SHELL_RENDERER_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> |
11 | 11 |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
14 #include "content/shell/renderer/test_runner/WebTask.h" | 14 #include "content/shell/renderer/test_runner/WebTask.h" |
15 #include "content/shell/renderer/test_runner/web_test_runner.h" | 15 #include "content/shell/renderer/test_runner/web_test_runner.h" |
16 #include "v8/include/v8.h" | 16 #include "v8/include/v8.h" |
17 | 17 |
| 18 class GURL; |
18 class SkBitmap; | 19 class SkBitmap; |
19 | 20 |
20 namespace blink { | 21 namespace blink { |
21 class WebFrame; | 22 class WebFrame; |
22 class WebNotificationPresenter; | 23 class WebNotificationPresenter; |
23 class WebPermissionClient; | 24 class WebPermissionClient; |
24 class WebString; | 25 class WebString; |
25 class WebView; | 26 class WebView; |
26 } | 27 } |
27 | 28 |
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
511 | 512 |
512 // Calls setlocale(LC_ALL, ...) for a specified locale. | 513 // Calls setlocale(LC_ALL, ...) for a specified locale. |
513 // Resets between tests. | 514 // Resets between tests. |
514 void SetPOSIXLocale(const std::string& locale); | 515 void SetPOSIXLocale(const std::string& locale); |
515 | 516 |
516 // MIDI function to control permission handling. | 517 // MIDI function to control permission handling. |
517 void SetMIDIAccessorResult(bool result); | 518 void SetMIDIAccessorResult(bool result); |
518 void SetMIDISysexPermission(bool value); | 519 void SetMIDISysexPermission(bool value); |
519 | 520 |
520 // Grants permission for desktop notifications to an origin | 521 // Grants permission for desktop notifications to an origin |
521 void GrantWebNotificationPermission(const std::string& origin, | 522 void GrantWebNotificationPermission(const GURL& origin, |
522 bool permission_granted); | 523 bool permission_granted); |
| 524 |
| 525 // Clears all previously granted Web Notification permissions. |
| 526 void ClearWebNotificationPermissions(); |
| 527 |
523 // Simulates a click on a desktop notification. | 528 // Simulates a click on a desktop notification. |
524 bool SimulateWebNotificationClick(const std::string& value); | 529 bool SimulateWebNotificationClick(const std::string& value); |
525 | 530 |
526 // Speech recognition related functions. | 531 // Speech recognition related functions. |
527 void AddMockSpeechRecognitionResult(const std::string& transcript, | 532 void AddMockSpeechRecognitionResult(const std::string& transcript, |
528 double confidence); | 533 double confidence); |
529 void SetMockSpeechRecognitionError(const std::string& error, | 534 void SetMockSpeechRecognitionError(const std::string& error, |
530 const std::string& message); | 535 const std::string& message); |
531 bool WasMockSpeechRecognitionAborted(); | 536 bool WasMockSpeechRecognitionAborted(); |
532 | 537 |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
755 bool use_mock_theme_; | 760 bool use_mock_theme_; |
756 | 761 |
757 base::WeakPtrFactory<TestRunner> weak_factory_; | 762 base::WeakPtrFactory<TestRunner> weak_factory_; |
758 | 763 |
759 DISALLOW_COPY_AND_ASSIGN(TestRunner); | 764 DISALLOW_COPY_AND_ASSIGN(TestRunner); |
760 }; | 765 }; |
761 | 766 |
762 } // namespace content | 767 } // namespace content |
763 | 768 |
764 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_TEST_RUNNER_H_ | 769 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_TEST_RUNNER_H_ |
OLD | NEW |