diff options
Diffstat (limited to 'tests/test_browser.py')
-rw-r--r-- | tests/test_browser.py | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/tests/test_browser.py b/tests/test_browser.py index 42a1c0a0..81e9bf25 100644 --- a/tests/test_browser.py +++ b/tests/test_browser.py @@ -719,10 +719,9 @@ If manually bisecting: self.clear() self.btest('sdl_canvas.c', expected='1', args=['-s', 'LEGACY_GL_EMULATION=1', '-O2', '-s', 'SAFE_HEAP=1']) - def test_sdl_canvas_proxy(self): - def post(): - html = open('test.html').read() - html = html.replace('</body>', ''' + def post_manual_reftest(self): + html = open('test.html').read() + html = html.replace('</body>', ''' <script> function assert(x, y) { if (!x) throw 'assertion failed ' + y } @@ -738,11 +737,14 @@ window.close = function() { }; </script> </body>''' % open('reftest.js').read()) - open('test.html', 'w').write(html) + open('test.html', 'w').write(html) + def test_sdl_canvas_proxy(self): open('data.txt', 'w').write('datum') + self.btest('sdl_canvas_proxy.c', reference='sdl_canvas_proxy.png', args=['--proxy-to-worker', '--preload-file', 'data.txt'], manual_reference=True, post_build=self.post_manual_reftest) - self.btest('sdl_canvas_proxy.c', reference='sdl_canvas_proxy.png', args=['--proxy-to-worker', '--preload-file', 'data.txt'], manual_reference=True, post_build=post) + def test_glgears_proxy(self): + self.btest('hello_world_gles_proxy.c', reference='gears.png', args=['--proxy-to-worker'], manual_reference=True, post_build=self.post_manual_reftest, reference_slack=8) def test_sdl_canvas_alpha(self): self.btest('sdl_canvas_alpha.c', reference='sdl_canvas_alpha.png', reference_slack=9) @@ -1307,7 +1309,9 @@ keydown(100);keyup(100); // trigger the end message='You should see animating gears.') def test_glgears_long(self): - self.btest('hello_world_gles.c', expected=map(str, range(30, 1000)), args=['-DHAVE_BUILTIN_SINCOS', '-DLONGTEST']) + for proxy in [0, 1]: + print 'proxy', proxy + self.btest('hello_world_gles.c', expected=map(str, range(30, 500)), args=['-DHAVE_BUILTIN_SINCOS', '-DLONGTEST'] + (['--proxy-to-worker'] if proxy else [])) def test_glgears_animation(self): es2_suffix = ['', '_full', '_full_944'] @@ -1478,6 +1482,9 @@ keydown(100);keyup(100); // trigger the end def test_cubegeom(self): self.btest('cubegeom.c', reference='cubegeom.png', args=['-O2', '-g', '-s', 'LEGACY_GL_EMULATION=1']) + #def test_cubegeom_proxy(self): + # self.btest('cubegeom.c', reference='cubegeom.png', args=['-O2', '-g', '-s', 'LEGACY_GL_EMULATION=1', '--proxy-to-worker'], manual_reference=True, post_build=self.post_manual_reftest) + def test_cubegeom_proc(self): open('side.c', 'w').write(r''' |