diff --git a/src/tests/servers/app/Jamfile b/src/tests/servers/app/Jamfile index 37919e24cf..1a94100f1c 100644 --- a/src/tests/servers/app/Jamfile +++ b/src/tests/servers/app/Jamfile @@ -1,3 +1,4 @@ SubDir OBOS_TOP src tests servers app ; SubInclude OBOS_TOP src tests servers app painter ; +SubInclude OBOS_TOP src tests servers app windows ; diff --git a/src/tests/servers/app/windows/Jamfile b/src/tests/servers/app/windows/Jamfile new file mode 100644 index 0000000000..cf7f20ffdf --- /dev/null +++ b/src/tests/servers/app/windows/Jamfile @@ -0,0 +1,9 @@ +SubDir OBOS_TOP src tests servers app windows ; + +UseHeaders [ FDirName os app ] ; +UseHeaders [ FDirName os interface ] ; + +SimpleTest Window : + main.cpp + : libopenbeos.so ; + diff --git a/src/tests/servers/app/windows/NOTES b/src/tests/servers/app/windows/NOTES new file mode 100644 index 0000000000..1b144f5a46 --- /dev/null +++ b/src/tests/servers/app/windows/NOTES @@ -0,0 +1,3 @@ +For the test to run properly on BeOS, you need to make links to some Haiku libs in your ~/config/lib folder. The test itself links to libopenbeos.so, app_server additionally links to libappserver.so, libz.so, libpng.so and libfreetype.so. + +The script "run" launches the Haiku app_server and a second later the test app which connects to it. diff --git a/src/tests/servers/app/windows/main.cpp b/src/tests/servers/app/windows/main.cpp new file mode 100644 index 0000000000..b1e5709b63 --- /dev/null +++ b/src/tests/servers/app/windows/main.cpp @@ -0,0 +1,29 @@ +// main.cpp + +#include + +#include "Application.h" +#include "View.h" +#include "Window.h" + +// main +int +main(int argc, char** argv) +{ + BApplication* app = new BApplication("application/x.vnd-Haiku.windows_test"); + + BRect bounds(50.0, 50.0, 200.0, 150.0); + + BWindow* window = new BWindow(bounds, "Test", + B_TITLED_WINDOW, + B_ASYNCHRONOUS_CONTROLS | B_QUIT_ON_WINDOW_CLOSE); + + BView* view = new BView(window->Bounds(), "test", B_FOLLOW_ALL, B_WILL_DRAW); + + window->AddChild(view); + + window->Show(); + app->Run(); + delete app; + return 0; +} diff --git a/src/tests/servers/app/windows/run b/src/tests/servers/app/windows/run new file mode 100755 index 0000000000..571ed77283 --- /dev/null +++ b/src/tests/servers/app/windows/run @@ -0,0 +1,5 @@ +#!/bin/sh + +../../../../../distro/x86.R1/beos/system/servers/app_server & +sleep 1s +../../../../../tests/servers/app/windows/Window