Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Side by Side Diff: components/test_runner/test_runner.cc

Issue 1589643003: OOPIF support for testRunner.dumpAsText and similar layout dumps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ready for review. Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1845 matching lines...) Expand 10 before | Expand all | Expand 10 after
1856 } 1856 }
1857 1857
1858 bool TestRunner::ShouldDumpAsAudio() const { 1858 bool TestRunner::ShouldDumpAsAudio() const {
1859 return dump_as_audio_; 1859 return dump_as_audio_;
1860 } 1860 }
1861 1861
1862 void TestRunner::GetAudioData(std::vector<unsigned char>* buffer_view) const { 1862 void TestRunner::GetAudioData(std::vector<unsigned char>* buffer_view) const {
1863 *buffer_view = audio_data_; 1863 *buffer_view = audio_data_;
1864 } 1864 }
1865 1865
1866 LayoutDumpFlags TestRunner::GetLayoutDumpFlags() {
1867 LayoutDumpFlags result;
1868
1869 result.dump_as_text = shouldDumpAsText();
1870 result.dump_as_markup = shouldDumpAsMarkup();
1871 result.dump_scroll_positions = !shouldDumpAsText() && !shouldDumpAsMarkup();
1872
1873 result.dump_as_printed = isPrinting();
1874
1875 result.dump_child_frames =
1876 (result.dump_as_text && shouldDumpChildFramesAsText()) ||
1877 (result.dump_as_markup && shouldDumpChildFramesAsMarkup()) ||
1878 (result.dump_scroll_positions && shouldDumpChildFrameScrollPositions());
1879
1880 result.dump_line_box_trees = result.debug_render_tree = false;
1881
1882 return result;
1883 }
1884
1885 bool TestRunner::HasCustomTextDump(std::string* custom_text_dump) const {
1886 if (shouldDumpAsCustomText()) {
1887 *custom_text_dump = customDumpText();
1888 return true;
1889 }
1890
1891 return false;
1892 }
1893
1866 bool TestRunner::shouldDumpFrameLoadCallbacks() const { 1894 bool TestRunner::shouldDumpFrameLoadCallbacks() const {
1867 return test_is_running_ && dump_frame_load_callbacks_; 1895 return test_is_running_ && dump_frame_load_callbacks_;
1868 } 1896 }
1869 1897
1870 void TestRunner::setShouldDumpFrameLoadCallbacks(bool value) { 1898 void TestRunner::setShouldDumpFrameLoadCallbacks(bool value) {
1871 dump_frame_load_callbacks_ = value; 1899 dump_frame_load_callbacks_ = value;
1872 } 1900 }
1873 1901
1874 bool TestRunner::shouldDumpPingLoaderCallbacks() const { 1902 bool TestRunner::shouldDumpPingLoaderCallbacks() const {
1875 return test_is_running_ && dump_ping_loader_callbacks_; 1903 return test_is_running_ && dump_ping_loader_callbacks_;
(...skipping 1312 matching lines...) Expand 10 before | Expand all | Expand 10 after
3188 } 3216 }
3189 3217
3190 void TestRunner::DidLosePointerLockInternal() { 3218 void TestRunner::DidLosePointerLockInternal() {
3191 bool was_locked = pointer_locked_; 3219 bool was_locked = pointer_locked_;
3192 pointer_locked_ = false; 3220 pointer_locked_ = false;
3193 if (was_locked) 3221 if (was_locked)
3194 web_view_->didLosePointerLock(); 3222 web_view_->didLosePointerLock();
3195 } 3223 }
3196 3224
3197 } // namespace test_runner 3225 } // namespace test_runner
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698