Skip to content

Commit 67260bb

Browse files
committed
tests: test_html5: test emscripten_get_screen_size
1 parent ebec606 commit 67260bb

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

tests/test_html5.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,11 @@ int main()
420420
? EMSCRIPTEN_RESULT_SUCCESS : EMSCRIPTEN_RESULT_FAILED);
421421
TEST_RESULT(emscripten_get_window_title);
422422

423+
int width, height;
424+
emscripten_get_screen_size(&width, &height);
425+
ret = (width && height) ? EMSCRIPTEN_RESULT_SUCCESS : EMSCRIPTEN_RESULT_FAILED;
426+
TEST_RESULT(emscripten_get_screen_size);
427+
423428
/* For the events to function, one must either call emscripten_set_main_loop or enable Module.noExitRuntime by some other means.
424429
Otherwise the application will exit after leaving main(), and the atexit handlers will clean up all event hooks (by design). */
425430
EM_ASM(noExitRuntime = true);

0 commit comments

Comments
 (0)