| 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 "components/test_runner/test_runner.h" | 5 #include "components/test_runner/test_runner.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 1891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1902 } | 1902 } |
| 1903 | 1903 |
| 1904 void TestRunner::setShouldDumpFrameLoadCallbacks(bool value) { | 1904 void TestRunner::setShouldDumpFrameLoadCallbacks(bool value) { |
| 1905 dump_frame_load_callbacks_ = value; | 1905 dump_frame_load_callbacks_ = value; |
| 1906 } | 1906 } |
| 1907 | 1907 |
| 1908 bool TestRunner::shouldDumpPingLoaderCallbacks() const { | 1908 bool TestRunner::shouldDumpPingLoaderCallbacks() const { |
| 1909 return test_is_running_ && dump_ping_loader_callbacks_; | 1909 return test_is_running_ && dump_ping_loader_callbacks_; |
| 1910 } | 1910 } |
| 1911 | 1911 |
| 1912 void TestRunner::setShouldDumpPingLoaderCallbacks(bool value) { | |
| 1913 dump_ping_loader_callbacks_ = value; | |
| 1914 } | |
| 1915 | |
| 1916 void TestRunner::setShouldEnableViewSource(bool value) { | 1912 void TestRunner::setShouldEnableViewSource(bool value) { |
| 1917 web_view_->mainFrame()->enableViewSourceMode(value); | 1913 web_view_->mainFrame()->enableViewSourceMode(value); |
| 1918 } | 1914 } |
| 1919 | 1915 |
| 1920 bool TestRunner::shouldDumpUserGestureInFrameLoadCallbacks() const { | 1916 bool TestRunner::shouldDumpUserGestureInFrameLoadCallbacks() const { |
| 1921 return test_is_running_ && dump_user_gesture_in_frame_load_callbacks_; | 1917 return test_is_running_ && dump_user_gesture_in_frame_load_callbacks_; |
| 1922 } | 1918 } |
| 1923 | 1919 |
| 1924 bool TestRunner::shouldDumpTitleChanges() const { | 1920 bool TestRunner::shouldDumpTitleChanges() const { |
| 1925 return dump_title_changes_; | 1921 return dump_title_changes_; |
| 1926 } | 1922 } |
| 1927 | 1923 |
| 1928 bool TestRunner::shouldDumpIconChanges() const { | 1924 bool TestRunner::shouldDumpIconChanges() const { |
| 1929 return dump_icon_changes_; | 1925 return dump_icon_changes_; |
| 1930 } | 1926 } |
| 1931 | 1927 |
| 1932 bool TestRunner::shouldDumpCreateView() const { | 1928 bool TestRunner::shouldDumpCreateView() const { |
| 1933 return dump_create_view_; | 1929 return dump_create_view_; |
| 1934 } | 1930 } |
| 1935 | 1931 |
| 1936 bool TestRunner::canOpenWindows() const { | 1932 bool TestRunner::canOpenWindows() const { |
| 1937 return can_open_windows_; | 1933 return can_open_windows_; |
| 1938 } | 1934 } |
| 1939 | 1935 |
| 1940 bool TestRunner::shouldDumpResourceLoadCallbacks() const { | 1936 bool TestRunner::shouldDumpResourceLoadCallbacks() const { |
| 1941 return test_is_running_ && dump_resource_load_callbacks_; | 1937 return test_is_running_ && dump_resource_load_callbacks_; |
| 1942 } | 1938 } |
| 1943 | 1939 |
| 1944 bool TestRunner::shouldDumpResourceRequestCallbacks() const { | |
| 1945 return test_is_running_ && dump_resource_request_callbacks_; | |
| 1946 } | |
| 1947 | |
| 1948 bool TestRunner::shouldDumpResourceResponseMIMETypes() const { | 1940 bool TestRunner::shouldDumpResourceResponseMIMETypes() const { |
| 1949 return test_is_running_ && dump_resource_response_mime_types_; | 1941 return test_is_running_ && dump_resource_response_mime_types_; |
| 1950 } | 1942 } |
| 1951 | 1943 |
| 1952 WebContentSettingsClient* TestRunner::GetWebContentSettings() const { | 1944 WebContentSettingsClient* TestRunner::GetWebContentSettings() const { |
| 1953 return web_content_settings_.get(); | 1945 return web_content_settings_.get(); |
| 1954 } | 1946 } |
| 1955 | 1947 |
| 1956 void TestRunner::InitializeWebViewWithMocks(blink::WebView* web_view) { | 1948 void TestRunner::InitializeWebViewWithMocks(blink::WebView* web_view) { |
| 1957 web_view->setSpellCheckClient(spellcheck_.get()); | 1949 web_view->setSpellCheckClient(spellcheck_.get()); |
| (...skipping 1354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3312 } | 3304 } |
| 3313 | 3305 |
| 3314 void TestRunner::DidLosePointerLockInternal() { | 3306 void TestRunner::DidLosePointerLockInternal() { |
| 3315 bool was_locked = pointer_locked_; | 3307 bool was_locked = pointer_locked_; |
| 3316 pointer_locked_ = false; | 3308 pointer_locked_ = false; |
| 3317 if (was_locked) | 3309 if (was_locked) |
| 3318 web_view_->didLosePointerLock(); | 3310 web_view_->didLosePointerLock(); |
| 3319 } | 3311 } |
| 3320 | 3312 |
| 3321 } // namespace test_runner | 3313 } // namespace test_runner |
| OLD | NEW |