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

Issue 1689283003: Remove duplication between TestRunner's fields and LayoutDumpFlags struct. (Closed)

Created:
4 years, 10 months ago by Łukasz Anforowicz
Modified:
4 years, 9 months ago
CC:
alexmos, chromium-reviews, jochen+watch_chromium.org, mlamouri+watch-test-runner_chromium.org, site-isolation-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove duplication between TestRunner's fields and LayoutDumpFlags struct. The current CL paves the way for 1) moving more test flags from TestRunner's fields into LayoutDumpFlags and 2) replicating the test flags when transferring to another renderer process (in addition to using LayoutDumpFlags during a textual layout dump). In a way, the current CL backpedals on some aspects of an earlier CL (crrev.com/1589643003) which has introduced LayoutDumpFlags struct that holds layout dump flags for the purpose of passing them to the browser process (which can coordinate dumping across all frames). The backpedaling is necessary because: - Having LayoutDumpFlags is good for passing the flags to the browser process (when having to do a layout dump spanning multiple renderers / OOPIFs), but LayoutDumpFlags is also bad, because the same flags are represented (in a slightly different way) in 2 places: in LayoutDumpFlags struct and in TestRunner fields. This CL fixes this by moving relevant fields of TestRunner into LayoutDumpFlags struct. - The previous CL tried to be (unnecessarily :-/) smart and for example: - consolidated |dump_child_frames_as_text|, |dump_child_frames_as_markup| and |dump_child_frame_scroll_positions| into |dump_child_frames| field. - consolidated |dump_as_text|, |dump_as_markup| into a |main_dump_mode| field with 3 possible states - text / markup / scroll positions. The current CL backpedals on this and simply copies TestRunner's fields into LayoutDumpFlags, because otherwise preserving all existing test behavior is prooving to be really difficult. BUG=587175 Committed: https://crrev.com/9b9d70ea6efc122e1957198be5e7bba8924efaad Cr-Commit-Position: refs/heads/master@{#377712}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : Just copy/move existing fields - quit trying to consolidate/tweak them enroute. #

Patch Set 4 : More const-ref. #

Patch Set 5 : Fixing a silly mistake in DumpLayout function. #

Patch Set 6 : Fixing LayoutDumpFlags::dump_child_frames(). #

Patch Set 7 : Initializing *all* fields of LayoutDumpFlags :-/. #

Patch Set 8 : Rebasing... #

Total comments: 9

Patch Set 9 : Rebasing... #

Patch Set 10 : Comment tweaks + moving forward declaration around. #

Patch Set 11 : Rebasing... #

Patch Set 12 : Added a constructor for LayoutDumpFlag that takes initial values of all fields. #

Patch Set 13 : Despite LayoutDumpFlags constructor, we still need to set the flags in TestRunner::Reset. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+149 lines, -155 lines) Patch
M components/test_runner/layout_dump.cc View 1 2 3 4 1 chunk +31 lines, -39 lines 0 comments Download
M components/test_runner/layout_dump_flags.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +57 lines, -9 lines 0 comments Download
M components/test_runner/test_runner.h View 1 2 3 4 5 6 7 8 5 chunks +4 lines, -29 lines 0 comments Download
M components/test_runner/test_runner.cc View 1 2 3 4 5 6 7 8 9 10 11 12 10 chunks +31 lines, -59 lines 0 comments Download
M components/test_runner/web_test_runner.h View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -3 lines 0 comments Download
M content/shell/browser/layout_test/blink_test_controller.h View 1 2 3 4 5 6 7 3 chunks +6 lines, -2 lines 0 comments Download
M content/shell/browser/layout_test/blink_test_controller.cc View 1 2 3 4 5 6 7 2 chunks +3 lines, -2 lines 0 comments Download
M content/shell/common/shell_messages.h View 1 2 1 chunk +6 lines, -8 lines 0 comments Download
M content/shell/renderer/layout_test/blink_test_runner.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M content/shell/renderer/layout_test/layout_test_render_frame_observer.h View 1 2 3 2 chunks +6 lines, -2 lines 0 comments Download
M content/shell/renderer/layout_test/layout_test_render_frame_observer.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 30 (11 generated)
Łukasz Anforowicz
Dominic, could you please take a look?
4 years, 10 months ago (2016-02-18 16:52:19 UTC) #4
Łukasz Anforowicz
Actually, Daniel - could you take a first stab at reviewing this? You might have ...
4 years, 10 months ago (2016-02-18 18:23:52 UTC) #6
Łukasz Anforowicz
Daniel, I think that this CL is ready for a review - I think it ...
4 years, 10 months ago (2016-02-22 18:34:15 UTC) #7
dcheng
https://codereview.chromium.org/1689283003/diff/140001/components/test_runner/layout_dump.cc File components/test_runner/layout_dump.cc (right): https://codereview.chromium.org/1689283003/diff/140001/components/test_runner/layout_dump.cc#newcode75 components/test_runner/layout_dump.cc:75: } else { Hmm... maybe we should still explicitly ...
4 years, 10 months ago (2016-02-23 18:26:35 UTC) #8
Łukasz Anforowicz
Daniel, can you take another look please? https://codereview.chromium.org/1689283003/diff/140001/components/test_runner/layout_dump.cc File components/test_runner/layout_dump.cc (right): https://codereview.chromium.org/1689283003/diff/140001/components/test_runner/layout_dump.cc#newcode75 components/test_runner/layout_dump.cc:75: } else ...
4 years, 10 months ago (2016-02-23 18:45:27 UTC) #9
Łukasz Anforowicz
https://codereview.chromium.org/1689283003/diff/140001/components/test_runner/layout_dump_flags.h File components/test_runner/layout_dump_flags.h (right): https://codereview.chromium.org/1689283003/diff/140001/components/test_runner/layout_dump_flags.h#newcode16 components/test_runner/layout_dump_flags.h:16: // dump all frames as plain text. On 2016/02/23 ...
4 years, 10 months ago (2016-02-23 18:50:40 UTC) #10
jochen (gone - plz use gerrit)
Similar to content/browser, content/shell/browser must only include pure POD and enum headers from renderer components ...
4 years, 10 months ago (2016-02-23 18:52:52 UTC) #11
Łukasz Anforowicz
On 2016/02/23 18:52:52, jochen wrote: > Similar to content/browser, content/shell/browser must only include pure POD ...
4 years, 10 months ago (2016-02-23 19:04:47 UTC) #12
jochen (gone - plz use gerrit)
On 2016/02/23 at 19:04:47, lukasza wrote: > On 2016/02/23 18:52:52, jochen wrote: > > Similar ...
4 years, 10 months ago (2016-02-24 09:56:31 UTC) #13
Łukasz Anforowicz
Thanks jochen@ - can you take another look? On 2016/02/24 09:56:31, jochen wrote: > On ...
4 years, 10 months ago (2016-02-24 18:08:47 UTC) #14
jochen (gone - plz use gerrit)
lgtm btw, I plan to move the entire test_runner component to content/shell/renderer/test_runner (crbug.com/585292)
4 years, 10 months ago (2016-02-24 18:27:55 UTC) #16
Łukasz Anforowicz
On 2016/02/24 18:27:55, jochen wrote: > lgtm Thanks for reviewing :-) > btw, I plan ...
4 years, 10 months ago (2016-02-24 18:34:27 UTC) #17
jochen (gone - plz use gerrit)
On 2016/02/24 at 18:34:27, lukasza wrote: > On 2016/02/24 18:27:55, jochen wrote: > > lgtm ...
4 years, 10 months ago (2016-02-24 18:37:24 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1689283003/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1689283003/220001
4 years, 10 months ago (2016-02-24 18:44:36 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/185116)
4 years, 10 months ago (2016-02-24 20:11:13 UTC) #22
Łukasz Anforowicz
The patchset that got l-g-t-m moved setting of LayoutDumpFlags from TestRunner::Reset into the constructor of ...
4 years, 10 months ago (2016-02-25 18:16:10 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1689283003/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1689283003/240001
4 years, 10 months ago (2016-02-25 22:25:47 UTC) #26
commit-bot: I haz the power
Committed patchset #13 (id:240001)
4 years, 10 months ago (2016-02-25 23:45:52 UTC) #28
commit-bot: I haz the power
4 years, 10 months ago (2016-02-25 23:47:38 UTC) #30
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/9b9d70ea6efc122e1957198be5e7bba8924efaad
Cr-Commit-Position: refs/heads/master@{#377712}

Powered by Google App Engine
This is Rietveld 408576698