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

Issue 10914049: Added support for layout render tests. These use expected values for the text render output from Du… (Closed)

Created:
8 years, 3 months ago by gram
Modified:
8 years, 3 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Added support for layout render tests. These use expected values for the text render output from DumpRenderTree. When running a test in DRT the testrunner will see if there is a file with a .render extension in the same directory as the test file and with the same base file name. If so it will do additional checks of the rendered layout. Here is a simple example test: #library('sample'); #import('dart:html'); #import('pkg:unittest/unittest.dart'); main() { group('foo', () { test('test 1', () { document.body.nodes.add(new Element.html("<p>Test 1</p>")); }); test('test 2', () { document.body.nodes.add(new Element.html("<p>Test 2</p>")); }); }); } And a sample matching .render file: [foo test 1] RenderBlock {P} at (0,0) size 284x20 RenderText {#text} at (0,0) size 38x19 text run at (0,0) width 38: "Test 1" [foo test 2] RenderBlock {P} at (0,0) size 284x20 RenderText {#text} at (0,0) size 38x19 text run at (0,0) width 38: "Test 2" Note that the render content is only the content inside the <body> element, not including the body element itself. testrunner can generate render files itself if you use the --generate-renders flag. Also in this change - rename Configuration.log to trace, to avoid clash with the math log() function. Committed: https://code.google.com/p/dart/source/detail?r=11994

Patch Set 1 #

Total comments: 18

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+718 lines, -79 lines) Patch
M pkg/pkg.status View 1 2 3 4 5 2 chunks +3 lines, -4 lines 0 comments Download
M pkg/unittest/config.dart View 1 2 3 3 chunks +10 lines, -4 lines 0 comments Download
A pkg/unittest/html_layout_config.dart View 1 2 3 4 1 chunk +310 lines, -0 lines 0 comments Download
M pkg/unittest/interactive_html_config.dart View 1 16 chunks +48 lines, -47 lines 0 comments Download
M pkg/unittest/unittest.dart View 1 1 chunk +1 line, -1 line 0 comments Download
M utils/testrunner/configuration.dart View 1 2 3 4 5 2 chunks +3 lines, -1 line 0 comments Download
M utils/testrunner/dart_wrap_task.dart View 1 2 3 4 3 chunks +43 lines, -1 line 0 comments Download
M utils/testrunner/drt_task.dart View 1 1 chunk +210 lines, -1 line 0 comments Download
M utils/testrunner/html_wrap_task.dart View 1 4 chunks +22 lines, -12 lines 0 comments Download
M utils/testrunner/options.dart View 1 4 chunks +13 lines, -1 line 0 comments Download
M utils/testrunner/testrunner.dart View 1 2 3 4 5 3 chunks +43 lines, -7 lines 0 comments Download
M utils/testrunner/utils.dart View 1 1 chunk +12 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
gram
8 years, 3 months ago (2012-08-31 22:44:15 UTC) #1
Siggi Cherem (dart-lang)
Nice to see more layout test support! yay! In addition to this, I'd really really ...
8 years, 3 months ago (2012-09-05 17:45:41 UTC) #2
gram
For now, I have done a workaround for the issue I mentioned where the render ...
8 years, 3 months ago (2012-09-06 18:25:25 UTC) #3
Siggi Cherem (dart-lang)
8 years, 3 months ago (2012-09-06 20:12:10 UTC) #4
lgtm

can we add a TODO somewhere about adding single-file layout test runs? (the
support for .png files)

Powered by Google App Engine
This is Rietveld 408576698