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 |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
15 #include "base/strings/stringprintf.h" | 15 #include "base/strings/stringprintf.h" |
16 #include "build/build_config.h" | 16 #include "build/build_config.h" |
17 #include "components/test_runner/app_banner_client.h" | 17 #include "components/test_runner/app_banner_client.h" |
| 18 #include "components/test_runner/layout_dump.h" |
18 #include "components/test_runner/mock_credential_manager_client.h" | 19 #include "components/test_runner/mock_credential_manager_client.h" |
19 #include "components/test_runner/mock_screen_orientation_client.h" | 20 #include "components/test_runner/mock_screen_orientation_client.h" |
20 #include "components/test_runner/mock_web_speech_recognizer.h" | 21 #include "components/test_runner/mock_web_speech_recognizer.h" |
21 #include "components/test_runner/test_interfaces.h" | 22 #include "components/test_runner/test_interfaces.h" |
22 #include "components/test_runner/test_preferences.h" | 23 #include "components/test_runner/test_preferences.h" |
23 #include "components/test_runner/web_content_settings.h" | 24 #include "components/test_runner/web_content_settings.h" |
24 #include "components/test_runner/web_test_delegate.h" | 25 #include "components/test_runner/web_test_delegate.h" |
25 #include "components/test_runner/web_test_proxy.h" | 26 #include "components/test_runner/web_test_proxy.h" |
26 #include "gin/arguments.h" | 27 #include "gin/arguments.h" |
27 #include "gin/array_buffer.h" | 28 #include "gin/array_buffer.h" |
(...skipping 1801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1829 } | 1830 } |
1830 | 1831 |
1831 bool TestRunner::ShouldDumpAsAudio() const { | 1832 bool TestRunner::ShouldDumpAsAudio() const { |
1832 return dump_as_audio_; | 1833 return dump_as_audio_; |
1833 } | 1834 } |
1834 | 1835 |
1835 void TestRunner::GetAudioData(std::vector<unsigned char>* buffer_view) const { | 1836 void TestRunner::GetAudioData(std::vector<unsigned char>* buffer_view) const { |
1836 *buffer_view = audio_data_; | 1837 *buffer_view = audio_data_; |
1837 } | 1838 } |
1838 | 1839 |
1839 const LayoutDumpFlags& TestRunner::GetLayoutDumpFlags() { | 1840 bool TestRunner::IsRecursiveLayoutDumpRequested() { |
1840 CheckResponseMimeType(); | 1841 CheckResponseMimeType(); |
1841 return layout_dump_flags_; | 1842 return layout_dump_flags_.dump_child_frames(); |
| 1843 } |
| 1844 |
| 1845 std::string TestRunner::DumpLayout(blink::WebLocalFrame* frame) { |
| 1846 CheckResponseMimeType(); |
| 1847 return ::test_runner::DumpLayout(frame, layout_dump_flags_); |
1842 } | 1848 } |
1843 | 1849 |
1844 void TestRunner::ReplicateLayoutDumpFlagsChanges( | 1850 void TestRunner::ReplicateLayoutDumpFlagsChanges( |
1845 const base::DictionaryValue& changed_values) { | 1851 const base::DictionaryValue& changed_values) { |
1846 layout_dump_flags_.tracked_dictionary().ApplyUntrackedChanges(changed_values); | 1852 layout_dump_flags_.tracked_dictionary().ApplyUntrackedChanges(changed_values); |
1847 } | 1853 } |
1848 | 1854 |
1849 bool TestRunner::HasCustomTextDump(std::string* custom_text_dump) const { | 1855 bool TestRunner::HasCustomTextDump(std::string* custom_text_dump) const { |
1850 if (shouldDumpAsCustomText()) { | 1856 if (shouldDumpAsCustomText()) { |
1851 *custom_text_dump = customDumpText(); | 1857 *custom_text_dump = customDumpText(); |
(...skipping 1361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3213 } | 3219 } |
3214 | 3220 |
3215 void TestRunner::DidLosePointerLockInternal() { | 3221 void TestRunner::DidLosePointerLockInternal() { |
3216 bool was_locked = pointer_locked_; | 3222 bool was_locked = pointer_locked_; |
3217 pointer_locked_ = false; | 3223 pointer_locked_ = false; |
3218 if (was_locked) | 3224 if (was_locked) |
3219 web_view_->didLosePointerLock(); | 3225 web_view_->didLosePointerLock(); |
3220 } | 3226 } |
3221 | 3227 |
3222 } // namespace test_runner | 3228 } // namespace test_runner |
OLD | NEW |