Changes between Version 27 and Version 28 of Writing Layout Tests for DumpRenderTree
- Timestamp:
- Oct 27, 2011, 5:12:03 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Writing Layout Tests for DumpRenderTree
v27 v28 158 158 * add a 0 opacity to your text. 159 159 160 '''Important note:''' For the 2 last points, the text will still be on the text render tree dump! 160 '''Important note:''' For the 2 last points, the text will still be on the text render tree dump! You can however disable the text dump if you don't need it, see below. 161 161 162 162 If you test '''really needs to use some fonts''', make sure you use the ''Ahem'' font as it is a very portable font. Make sure to specify the font-height too not to depend on the platform (FIXME: not sure if this is really needed but better safe than sorry). … … 166 166 Native controls cover anything that is painted by the OS. In WebKit, this means buttons, scroll bars, media players, ... 167 167 168 You can use the previous tips for text here to hide your button if you don't need .168 You can use the previous tips for text here to hide your button if you don't need it. 169 169 170 170 For scroll bars, you just have to use the following rule in your CSS to disable them: … … 173 173 overflow: hidden; 174 174 }}} 175 176 === How to disable render tree dumps but keep the pixels === 177 178 If you want to just dump the pixels but don't care about DRT's text dump. You can use the following trick: 179 180 {{{ 181 if (window.layoutTestController) 182 layoutTestController.dumpAsText(true); 183 }}} 184 185 This is '''not''' a typo. It is an extremely confusing syntax but this disables the text dump (you dump an empty text file). 186 187 === How to disable the pixel dumps but keep the render tree dump === 188 189 There is currently no way for you to do that. 175 190 176 191 = Writing JavaScript-based DOM-only Test Cases =