diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-09-08 18:49:20 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-09-08 18:49:20 -0700 |
commit | 2d0bd0061a4e57f999cf5c4bd537ffd8a2a0cdba (patch) | |
tree | 7538e0a56c506ff4e56c3e5b085f486b1f0bf0e4 /tests/test_browser.py | |
parent | 82a80c6724f7a8f17daf0ee7a01f124a9ab193ec (diff) |
add test harness support for proxying, test_sdl_canvas_proxy passes
Diffstat (limited to 'tests/test_browser.py')
-rw-r--r-- | tests/test_browser.py | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/tests/test_browser.py b/tests/test_browser.py index 7465711b..c2910c80 100644 --- a/tests/test_browser.py +++ b/tests/test_browser.py @@ -628,7 +628,24 @@ If manually bisecting: self.run_browser('page.html', '', '/report_result?1') def test_sdl_canvas_proxy(self): - self.btest('sdl_canvas_proxy.c', '1', args=['--proxy-to-worker']) + def post(): + html = open('test.html').read() + html = html.replace('</body>', ''' +<script> +function assert(x, y) { if (!x) throw 'assertion failed ' + y } + +%s + +var windowClose = window.close; +window.close = function() { + doReftest(); + setTimeout(windowClose, 1000); +}; +</script> +</body>''' % open('reftest.js').read()) + open('test.html', 'w').write(html) + + self.btest('sdl_canvas_proxy.c', reference='sdl_canvas_proxy.png', args=['--proxy-to-worker'], manual_reference=True, post_build=post) def test_sdl_key(self): open(os.path.join(self.get_dir(), 'pre.js'), 'w').write(''' |