Skip to content

Commit

Permalink
tests: test_html5: test emscripten_get_screen_size
Browse files Browse the repository at this point in the history
  • Loading branch information
jakogut committed Apr 1, 2020
1 parent 3a5d263 commit 74a8d75
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/test_html5.c
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,11 @@ int main()
? EMSCRIPTEN_RESULT_SUCCESS : EMSCRIPTEN_RESULT_FAILED);
TEST_RESULT(emscripten_get_window_title);

int width, height;
emscripten_get_screen_size(&width, &height);
ret = (width && height) ? EMSCRIPTEN_RESULT_SUCCESS : EMSCRIPTEN_RESULT_FAILED;
TEST_RESULT(emscripten_get_screen_size);

/* For the events to function, one must either call emscripten_set_main_loop or enable Module.noExitRuntime by some other means.
Otherwise the application will exit after leaving main(), and the atexit handlers will clean up all event hooks (by design). */
EM_ASM(noExitRuntime = true);
Expand Down

0 comments on commit 74a8d75

Please sign in to comment.