| 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 SkBitmap; |
| 19 |
| 18 namespace blink { | 20 namespace blink { |
| 19 class WebFrame; | 21 class WebFrame; |
| 20 class WebNotificationPresenter; | 22 class WebNotificationPresenter; |
| 21 class WebPermissionClient; | 23 class WebPermissionClient; |
| 22 class WebString; | 24 class WebString; |
| 23 class WebView; | 25 class WebView; |
| 24 } | 26 } |
| 25 | 27 |
| 26 namespace gin { | 28 namespace gin { |
| 27 class ArrayBufferView; | 29 class ArrayBufferView; |
| (...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 524 bool WasMockSpeechRecognitionAborted(); | 526 bool WasMockSpeechRecognitionAborted(); |
| 525 | 527 |
| 526 // WebPageOverlay related functions. Permits the adding and removing of only | 528 // WebPageOverlay related functions. Permits the adding and removing of only |
| 527 // one opaque overlay. | 529 // one opaque overlay. |
| 528 void AddWebPageOverlay(); | 530 void AddWebPageOverlay(); |
| 529 void RemoveWebPageOverlay(); | 531 void RemoveWebPageOverlay(); |
| 530 | 532 |
| 531 void DisplayAsync(); | 533 void DisplayAsync(); |
| 532 void DisplayAsyncThen(v8::Handle<v8::Function> callback); | 534 void DisplayAsyncThen(v8::Handle<v8::Function> callback); |
| 533 | 535 |
| 536 // Similar to DisplayAsyncThen(), but pass parameters of the captured |
| 537 // snapshot (width, height, snapshot) to the callback. |
| 538 void CapturePixelsAsyncThen(v8::Handle<v8::Function> callback); |
| 539 |
| 534 void SetMockPushClientSuccess(const std::string& end_point, | 540 void SetMockPushClientSuccess(const std::string& end_point, |
| 535 const std::string& registration_id); | 541 const std::string& registration_id); |
| 536 void SetMockPushClientError(const std::string& message); | 542 void SetMockPushClientError(const std::string& message); |
| 537 | 543 |
| 538 /////////////////////////////////////////////////////////////////////////// | 544 /////////////////////////////////////////////////////////////////////////// |
| 539 // Internal helpers | 545 // Internal helpers |
| 546 |
| 547 void CapturePixelsCallback(scoped_ptr<InvokeCallbackTask> task, |
| 548 const SkBitmap& snapshot); |
| 549 |
| 540 void CheckResponseMimeType(); | 550 void CheckResponseMimeType(); |
| 541 void CompleteNotifyDone(); | 551 void CompleteNotifyDone(); |
| 542 | 552 |
| 543 void DidAcquirePointerLockInternal(); | 553 void DidAcquirePointerLockInternal(); |
| 544 void DidNotAcquirePointerLockInternal(); | 554 void DidNotAcquirePointerLockInternal(); |
| 545 void DidLosePointerLockInternal(); | 555 void DidLosePointerLockInternal(); |
| 546 | 556 |
| 547 // In the Mac code, this is called to trigger the end of a test after the | 557 // In the Mac code, this is called to trigger the end of a test after the |
| 548 // page has finished loading. From here, we can generate the dump for the | 558 // page has finished loading. From here, we can generate the dump for the |
| 549 // test. | 559 // test. |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 739 bool use_mock_theme_; | 749 bool use_mock_theme_; |
| 740 | 750 |
| 741 base::WeakPtrFactory<TestRunner> weak_factory_; | 751 base::WeakPtrFactory<TestRunner> weak_factory_; |
| 742 | 752 |
| 743 DISALLOW_COPY_AND_ASSIGN(TestRunner); | 753 DISALLOW_COPY_AND_ASSIGN(TestRunner); |
| 744 }; | 754 }; |
| 745 | 755 |
| 746 } // namespace content | 756 } // namespace content |
| 747 | 757 |
| 748 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_TEST_RUNNER_H_ | 758 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_TEST_RUNNER_H_ |
| OLD | NEW |