Commit graph

3 commits

Author SHA1 Message Date
hujianwei
21aa7494cd Add new buffer scale tests
* 12to11-test.xml (test_manager): <error>: New errors
`scale_lock_exists' and `invalid_scale'.
(test_manager): <get_test_surface>: Reword documentation.
(test_manager): <get_scale_lock>: New request.
(test_scale_lock): New interface.

* compositor.h: Update prototypes.
* output.c (HandleScaleSettingChange): New function.  Ignore
scale changes while scale is locked.
(XLInitRROutputs): Initialize real output scale.
* test.c (DestroyScaleLock, SetScale, GetScaleLock): New
functions.
(test_manager_impl): Add new implementation.
* tests/Imakefile (SYSTEM_LIBRARIES): Add MathLibrary.
(SRCS7, OBJS7): Add scale_test.c/.o.
(PROGRAMS): Add scale_test.
(scale_test): New program target.
* tests/run_tests.sh (standard_tests): Add scale_test.
* tests/svnignore.txt: Add scale_test.
* tests/test_harness.c (exit_with_code): New function.
(open_test_display): Initialize scale.
(report_test_failure): Call it instead of just exit.
(test_set_scale): New function.
(test_complete): Call exit_with_code.
* tests/test_harness.h (struct test_display): New field
`scale_lock'.
2022-11-05 08:18:18 +00:00
hujianwei
5d033bc93f Add new damage test and unify buffer release code in xdg_surface
* 12to11-test.xml (test_surface): <description>: Document when
frame callbacks are run.
* 12to11.c (HandleCmdline): Accept new arg `printsocket'.
(XLMain): Pass socket to HandleCmdline.
* 12to11.man: Document new `printsocket' option.
* mime0.awk:
* mime1.awk:
* mime2.awk:
* mime3.awk:
* mime4.awk: Fix typos in copyright blurb.
* test.c (NoteBounds): Sync with X server after XResizeWindow.
(Commit): Run frame callbacks after unmap as well.
(GetTestSurface): Make windows override redirect.

* tests/Imakefile (SRCS2, OBJS2): New program.
(PROGRAMS): Add damage_test.
(damage_test): New program.  Depend on SRCS2.
* tests/README: Improve documentation on how to run tests.
* tests/simple_test.c (test_names): New list.
(LAST_TEST): New define.
(verify_single_step): Complete test upon last test being run.
(test_single_step): Submit correct surface damage.
(test_next_step): New function.  Does nothing here.
(handle_wl_callback_done): Run the next test.
(submit_surface_damage): New function.
* tests/svnignore.txt: Add damage_test and Makefile.bak.
* tests/test_harness.c (test_complete): New function.
* tests/test_harness.h: New prototypes.
* xdg_surface.c (struct _XdgRole): Use a buffer release helper.
(struct _ReleaseLaterRecord, DeleteRecord, FreeRecords)
(AddRecordAfter): Delete unused structs and functions.
(RunFrameCallbacksConditionally, BufferIdleCallback)
(ReleaseBacking, ReleaseBuffer, XLGetXdgSurface): Use and free
buffer release helper; run frame callbacks from its callback.
2022-11-04 05:36:10 +00:00
hujianwei
4e9a442856 Check in C and XML files for tests
* 12to11-test.xml:
* buffer_release.c:
* test.c: New files.
2022-11-04 02:25:44 +00:00