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 "content/shell/common/test_runner/WebPreferences.h" | 9 #include "content/shell/common/test_runner/WebPreferences.h" |
10 #include "content/shell/renderer/test_runner/MockWebSpeechInputController.h" | 10 #include "content/shell/renderer/test_runner/MockWebSpeechInputController.h" |
(...skipping 1915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1926 web_view_->focusedFrame()->executeCommand(WebString::fromUTF8(command), | 1926 web_view_->focusedFrame()->executeCommand(WebString::fromUTF8(command), |
1927 WebString::fromUTF8(value)); | 1927 WebString::fromUTF8(value)); |
1928 } | 1928 } |
1929 | 1929 |
1930 bool TestRunner::IsCommandEnabled(const std::string& command) { | 1930 bool TestRunner::IsCommandEnabled(const std::string& command) { |
1931 return web_view_->focusedFrame()->isCommandEnabled( | 1931 return web_view_->focusedFrame()->isCommandEnabled( |
1932 WebString::fromUTF8(command)); | 1932 WebString::fromUTF8(command)); |
1933 } | 1933 } |
1934 | 1934 |
1935 bool TestRunner::CallShouldCloseOnWebView() { | 1935 bool TestRunner::CallShouldCloseOnWebView() { |
1936 return web_view_->dispatchBeforeUnloadEvent(); | 1936 return web_view_->mainFrame()->dispatchBeforeUnloadEvent(); |
1937 } | 1937 } |
1938 | 1938 |
1939 void TestRunner::SetDomainRelaxationForbiddenForURLScheme( | 1939 void TestRunner::SetDomainRelaxationForbiddenForURLScheme( |
1940 bool forbidden, const std::string& scheme) { | 1940 bool forbidden, const std::string& scheme) { |
1941 web_view_->setDomainRelaxationForbidden(forbidden, | 1941 web_view_->setDomainRelaxationForbidden(forbidden, |
1942 WebString::fromUTF8(scheme)); | 1942 WebString::fromUTF8(scheme)); |
1943 } | 1943 } |
1944 | 1944 |
1945 v8::Handle<v8::Value> TestRunner::EvaluateScriptInIsolatedWorldAndReturnValue( | 1945 v8::Handle<v8::Value> TestRunner::EvaluateScriptInIsolatedWorldAndReturnValue( |
1946 int world_id, | 1946 int world_id, |
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2628 } | 2628 } |
2629 | 2629 |
2630 void TestRunner::DidLosePointerLockInternal() { | 2630 void TestRunner::DidLosePointerLockInternal() { |
2631 bool was_locked = pointer_locked_; | 2631 bool was_locked = pointer_locked_; |
2632 pointer_locked_ = false; | 2632 pointer_locked_ = false; |
2633 if (was_locked) | 2633 if (was_locked) |
2634 web_view_->didLosePointerLock(); | 2634 web_view_->didLosePointerLock(); |
2635 } | 2635 } |
2636 | 2636 |
2637 } // namespace content | 2637 } // namespace content |
OLD | NEW |