| 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 #include "content/shell/renderer/test_runner/test_runner.h" | 5 #include "content/shell/renderer/test_runner/test_runner.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "content/shell/common/test_runner/test_preferences.h" | 10 #include "content/shell/common/test_runner/test_preferences.h" |
| 11 #include "content/shell/renderer/test_runner/mock_credential_manager_client.h" | 11 #include "content/shell/renderer/test_runner/mock_credential_manager_client.h" |
| 12 #include "content/shell/renderer/test_runner/mock_web_speech_recognizer.h" | 12 #include "content/shell/renderer/test_runner/mock_web_speech_recognizer.h" |
| 13 #include "content/shell/renderer/test_runner/test_interfaces.h" | 13 #include "content/shell/renderer/test_runner/test_interfaces.h" |
| 14 #include "content/shell/renderer/test_runner/web_content_settings.h" | 14 #include "content/shell/renderer/test_runner/web_content_settings.h" |
| 15 #include "content/shell/renderer/test_runner/web_test_delegate.h" | 15 #include "content/shell/renderer/test_runner/web_test_delegate.h" |
| 16 #include "content/shell/renderer/test_runner/web_test_proxy.h" | 16 #include "content/shell/renderer/test_runner/web_test_proxy.h" |
| 17 #include "gin/arguments.h" | 17 #include "gin/arguments.h" |
| 18 #include "gin/array_buffer.h" | 18 #include "gin/array_buffer.h" |
| 19 #include "gin/handle.h" | 19 #include "gin/handle.h" |
| 20 #include "gin/object_template_builder.h" | 20 #include "gin/object_template_builder.h" |
| 21 #include "gin/wrappable.h" | 21 #include "gin/wrappable.h" |
| 22 #include "third_party/WebKit/public/platform/WebBatteryStatus.h" | 22 #include "third_party/WebKit/public/platform/WebBatteryStatus.h" |
| 23 #include "third_party/WebKit/public/platform/WebCanvas.h" | 23 #include "third_party/WebKit/public/platform/WebCanvas.h" |
| 24 #include "third_party/WebKit/public/platform/WebData.h" | 24 #include "third_party/WebKit/public/platform/WebData.h" |
| 25 #include "third_party/WebKit/public/platform/WebLocalCredential.h" | 25 #include "third_party/WebKit/public/platform/WebPasswordCredential.h" |
| 26 #include "third_party/WebKit/public/platform/WebPoint.h" | 26 #include "third_party/WebKit/public/platform/WebPoint.h" |
| 27 #include "third_party/WebKit/public/platform/WebServiceWorkerRegistration.h" | 27 #include "third_party/WebKit/public/platform/WebServiceWorkerRegistration.h" |
| 28 #include "third_party/WebKit/public/platform/WebURLResponse.h" | 28 #include "third_party/WebKit/public/platform/WebURLResponse.h" |
| 29 #include "third_party/WebKit/public/platform/modules/device_orientation/WebDevic
eMotionData.h" | 29 #include "third_party/WebKit/public/platform/modules/device_orientation/WebDevic
eMotionData.h" |
| 30 #include "third_party/WebKit/public/platform/modules/device_orientation/WebDevic
eOrientationData.h" | 30 #include "third_party/WebKit/public/platform/modules/device_orientation/WebDevic
eOrientationData.h" |
| 31 #include "third_party/WebKit/public/web/WebArrayBuffer.h" | 31 #include "third_party/WebKit/public/web/WebArrayBuffer.h" |
| 32 #include "third_party/WebKit/public/web/WebArrayBufferConverter.h" | 32 #include "third_party/WebKit/public/web/WebArrayBufferConverter.h" |
| 33 #include "third_party/WebKit/public/web/WebBindings.h" | 33 #include "third_party/WebKit/public/web/WebBindings.h" |
| 34 #include "third_party/WebKit/public/web/WebDataSource.h" | 34 #include "third_party/WebKit/public/web/WebDataSource.h" |
| 35 #include "third_party/WebKit/public/web/WebDocument.h" | 35 #include "third_party/WebKit/public/web/WebDocument.h" |
| (...skipping 2857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2893 | 2893 |
| 2894 bool TestRunner::WasMockSpeechRecognitionAborted() { | 2894 bool TestRunner::WasMockSpeechRecognitionAborted() { |
| 2895 return proxy_->GetSpeechRecognizerMock()->WasAborted(); | 2895 return proxy_->GetSpeechRecognizerMock()->WasAborted(); |
| 2896 } | 2896 } |
| 2897 | 2897 |
| 2898 void TestRunner::AddMockCredentialManagerResponse(const std::string& id, | 2898 void TestRunner::AddMockCredentialManagerResponse(const std::string& id, |
| 2899 const std::string& name, | 2899 const std::string& name, |
| 2900 const std::string& avatar, | 2900 const std::string& avatar, |
| 2901 const std::string& password) { | 2901 const std::string& password) { |
| 2902 proxy_->GetCredentialManagerClientMock()->SetResponse( | 2902 proxy_->GetCredentialManagerClientMock()->SetResponse( |
| 2903 new WebLocalCredential(WebString::fromUTF8(id), | 2903 new WebPasswordCredential(WebString::fromUTF8(id), |
| 2904 WebString::fromUTF8(name), | 2904 WebString::fromUTF8(password), |
| 2905 WebURL(GURL(avatar)), | 2905 WebString::fromUTF8(name), |
| 2906 WebString::fromUTF8(password))); | 2906 WebURL(GURL(avatar)))); |
| 2907 } | 2907 } |
| 2908 | 2908 |
| 2909 void TestRunner::AddWebPageOverlay() { | 2909 void TestRunner::AddWebPageOverlay() { |
| 2910 if (web_view_ && !page_overlay_) { | 2910 if (web_view_ && !page_overlay_) { |
| 2911 page_overlay_ = new TestPageOverlay; | 2911 page_overlay_ = new TestPageOverlay; |
| 2912 web_view_->addPageOverlay(page_overlay_, 0); | 2912 web_view_->addPageOverlay(page_overlay_, 0); |
| 2913 } | 2913 } |
| 2914 } | 2914 } |
| 2915 | 2915 |
| 2916 void TestRunner::RemoveWebPageOverlay() { | 2916 void TestRunner::RemoveWebPageOverlay() { |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3087 } | 3087 } |
| 3088 | 3088 |
| 3089 void TestRunner::DidLosePointerLockInternal() { | 3089 void TestRunner::DidLosePointerLockInternal() { |
| 3090 bool was_locked = pointer_locked_; | 3090 bool was_locked = pointer_locked_; |
| 3091 pointer_locked_ = false; | 3091 pointer_locked_ = false; |
| 3092 if (was_locked) | 3092 if (was_locked) |
| 3093 web_view_->didLosePointerLock(); | 3093 web_view_->didLosePointerLock(); |
| 3094 } | 3094 } |
| 3095 | 3095 |
| 3096 } // namespace content | 3096 } // namespace content |
| OLD | NEW |