diff options
Diffstat (limited to 'tests/test_browser.py')
-rw-r--r-- | tests/test_browser.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/test_browser.py b/tests/test_browser.py index 27dffff2..02bcecbd 100644 --- a/tests/test_browser.py +++ b/tests/test_browser.py @@ -683,6 +683,9 @@ If manually bisecting: def test_sdl_canvas(self): self.btest('sdl_canvas.c', expected='1', args=['-s', 'LEGACY_GL_EMULATION=1']) + # some extra coverage + self.btest('sdl_canvas.c', expected='1', args=['-s', 'LEGACY_GL_EMULATION=1', '-s', '-O0', 'SAFE_HEAP=1']) + self.btest('sdl_canvas.c', expected='1', args=['-s', 'LEGACY_GL_EMULATION=1', '-s', '-O2', 'SAFE_HEAP=1']) def test_sdl_canvas_proxy(self): def post(): @@ -1602,6 +1605,10 @@ keydown(100);keyup(100); // trigger the end shutil.copyfile(path_from_root('tests', 'screenshot.dds'), os.path.join(self.get_dir(), 'screenshot.dds')) self.btest('s3tc.c', reference='s3tc.png', args=['--preload-file', 'screenshot.dds', '-s', 'LEGACY_GL_EMULATION=1']) + def test_s3tc_ffp_only(self): + shutil.copyfile(path_from_root('tests', 'screenshot.dds'), os.path.join(self.get_dir(), 'screenshot.dds')) + self.btest('s3tc.c', reference='s3tc.png', args=['--preload-file', 'screenshot.dds', '-s', 'LEGACY_GL_EMULATION=1', '-s', 'GL_FFP_ONLY=1']) + def test_s3tc_crunch(self): shutil.copyfile(path_from_root('tests', 'ship.dds'), 'ship.dds') shutil.copyfile(path_from_root('tests', 'bloom.dds'), 'bloom.dds') @@ -1749,4 +1756,21 @@ keydown(100);keyup(100); // trigger the end # Now run test in browser self.btest(path_from_root('tests', 'uuid', 'test.c'), '1') + def test_glew(self): + self.btest(path_from_root('tests', 'glew.c'), expected='1') + self.btest(path_from_root('tests', 'glew.c'), args=['-s', 'LEGACY_GL_EMULATION=1'], expected='1') + self.btest(path_from_root('tests', 'glew.c'), args=['-DGLEW_MX'], expected='1') + self.btest(path_from_root('tests', 'glew.c'), args=['-s', 'LEGACY_GL_EMULATION=1', '-DGLEW_MX'], expected='1') + + def test_doublestart_bug(self): + open('pre.js', 'w').write(r''' +if (typeof Module === 'undefined') Module = eval('(function() { try { return Module || {} } catch(e) { return {} } })()'); +if (!Module['preRun']) Module['preRun'] = []; +Module["preRun"].push(function () { + Module['addRunDependency']('test_run_dependency'); + Module['removeRunDependency']('test_run_dependency'); +}); +''') + + self.btest('doublestart.c', args=['--pre-js', 'pre.js', '-o', 'test.html'], expected='1') |