Search code examples
dartdart-unittest

Headless testing using content_shell --dump-render-tree


I'm trying this Gist on my Kubuntu dart development box with one of my projects(standard unittest htmlconfiguration), I'm not seeing the Browser Output bit for the tests, rather I'm getting this

    Content-Type: text/plain
layer at (0,0) size 800x600
  RenderView at (0,0) size 800x600
layer at (0,0) size 800x15
  RenderBlock {HTML} at (0,0) size 800x15
    RenderBody {BODY} at (15,15) size 770x0 [bgcolor=#F8F8F8]
#EOF
#EOF
#EOF

so what am I doing wrong?

Command I'm using is

content_shell --args --dump-render-tree test/xml2json.html

Solution

  • Ok, found it, you need to add

    <script type="text/javascript" src="packages/unittest/test_controller.js"></script> 
    

    To your test html file, its mentioned here but not in the Gist