webamp/modern/resources/testSkins/sameObject/script.m
Jordan Eldredge cc09a8b9be Add modern integration tests (#881)
* add 2 test skins

* Add simple integration tests

* Simplify test skins
2019-11-30 13:42:53 -08:00

35 lines
1.1 KiB
Matlab
Executable file

#include "lib/std.mi"
Global Button play_button, pause_button, another_button;
play_button.onLeftClick () {
messageBox("play_button.onLeftClick", "Success", 0, "");
}
pause_button.onLeftClick () {
messageBox("pause_button.onLeftClick", "Success", 0, "");
}
System.onScriptLoaded()
{
if (play_button == another_button) {
messageBox("empty object equal each other", "Success", 0, "");
} else {
messageBox("empty object equal each other", "Fail", 1, "");
}
Layout normal = getContainer("main").getLayout("normal");
play_button = normal.findObject("Play");
another_button = normal.findObject("Play");
if (play_button == another_button) {
messageBox("same object equal each other", "Success", 0, "");
} else {
messageBox("same object equal each other", "Fail", 1, "");
}
pause_button = normal.findObject("Pause");
if (play_button != pause_button) {
messageBox("different objects do not equal each other", "Success", 0, "");
} else {
messageBox("different objects do not equal each other", "Fail", 1, "");
}
}