diff options
author | Jukka Jylänki <jujjyl@gmail.com> | 2013-10-23 17:43:01 +0300 |
---|---|---|
committer | Jukka Jylänki <jujjyl@gmail.com> | 2013-10-23 17:43:50 +0300 |
commit | 72d25f1d46f25a6aa4fbaea884bb583cec7332c5 (patch) | |
tree | 40376c6e5355ea64bb0353a45252198a4fd3b8c4 /tests/test_browser.py | |
parent | 785f61c1795649de42561dd60cb4e81c06cccb04 (diff) |
Implement SDL_SetVideoMode(0,0, ...) to create the canvas in whatever size the <canvas> was in, and not try to resize the canvas to 0x0 pixels. Derive a new test for that from sdl_ogl.c. Fixes #1059.
Diffstat (limited to 'tests/test_browser.py')
-rw-r--r-- | tests/test_browser.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_browser.py b/tests/test_browser.py index ecd331fd..000dd95a 100644 --- a/tests/test_browser.py +++ b/tests/test_browser.py @@ -942,6 +942,11 @@ keydown(100);keyup(100); // trigger the end Popen([PYTHON, EMCC, '-O2', '--closure', '1', '--minify', '0', os.path.join(self.get_dir(), 'sdl_audio_beep.cpp'), '-s', 'DISABLE_EXCEPTION_CATCHING=0', '-o', 'page.html']).communicate() self.run_browser('page.html', '', '/report_result?1') + def test_sdl_canvas_size(self): + self.btest('sdl_canvas_size.c', reference='screenshot-gray-purple.png', reference_slack=1, + args=['-O2', '--minify', '0', '--shell-file', path_from_root('tests', 'sdl_canvas_size.html'), '--preload-file', os.path.join(self.get_dir(), 'screenshot.png') + '@/', '-s', 'LEGACY_GL_EMULATION=1'], + message='You should see an image with gray at the top.') + def test_sdl_gl_read(self): # SDL, OpenGL, readPixels open(os.path.join(self.get_dir(), 'sdl_gl_read.c'), 'w').write(self.with_report_result(open(path_from_root('tests', 'sdl_gl_read.c')).read())) |