kripken/emscripten — pull request #2198 by juj (2014-03-06 19:06:22+00:00)
Title: Interactive tests

This PR adds two things:
1. refactors the current `browser` test suite like discussed some time ago with azakai: the tests that require interactive human attention now live in a new `interactive` suite. The old `browser.audio` suite is removed and audio tests moved to that new suite. The `browser` test suite now only contains automated tests.
2. Adds a new interactive test `interactive.test_sdl_wm_togglefullscreen` that examines the recent regression caused by #2155 and partially fixed by #2190.

The new test paints the canvas yellow and asks user to click the canvas twice. The first click will transition to fullscreen, and the second click will exit fullscreen.

The new test fails at present, due to the following four(!) bugs:
1. Clicking with mouse does not always transition to full screen. It looks like the success depends on how fast the user clicks the mouse. If user clicks very fast, the transitioning doesn't happen. If user holds down the mouse button for a long time (~second or so), then the fullscreen transition does seem to work.
2. After successfully transitioning to fullscreen, sometimes the yellow canvas is not visible.
3. After successfully transitioning to fullscreen and when the yellow canvas is visible, the canvas is not maximized, but is placed to the top-left corner of the screen, and only partially covering the fullscreen window.
4. Always when exiting fullscreen, the canvas is no longer visible.

I'm working on debugging these issues further. Currently it looks a bit like manipulating the page DOM structure in fullscreen transition events is what's causing most of the headache.

cc @DerKoun