Remove gtk.demo.js and merge to testloader.js

This commit is contained in:
Namhyeon Go 2023-11-07 11:04:21 +09:00
parent 4fde95bbf6
commit f8ee2cf3e5
3 changed files with 114 additions and 69 deletions

44
data/test-gtk-server.json Normal file
View File

@ -0,0 +1,44 @@
{
"description": "WelsonJS GTK-Server (GTK 2) test profile",
"date": "2023-11-07",
"revision": "r1",
"authors": [
"Namhyeon Go <gnh1201@gmail.com"
],
"links": [
"https://github.com/gnh1201/welsonjs",
"https://catswords.social/@catswords_oss"
],
"tags": [
"javascript",
"microsoft",
"coffeescript",
"windows",
"typescript",
"html5",
"js",
"uri",
"desktop",
"ie",
"hta",
"es5",
"electronjs",
"jscript",
"wsh",
"mshtml",
"lolbins",
"lolbas",
"rescript",
"mshta"
],
"schema": {
"version": "0.1"
},
"tests": [
{
"id": "gtkserver_test",
"description": "GTK Server를 이용한 GUI(그래픽 사용자 인터페이스) 구현 가능 여부 확인",
"tags": ["GTK", "GTK"]
},
]
}

View File

@ -1,68 +0,0 @@
var GTK = require("lib/gtk");
function main() {
GTK.init(function() {
var win, table, button, entry, text, radiogroup, radio1, radio2;
// create new window
win = new GTK.Window({
title: "WelsonJS GTK GUI Demo Application",
width: 450,
height: 400
});
// create new table
table = new GTK.Table({
rows: 50,
columns: 50
});
win.setContainer(table);
// create new button
button = new GTK.Button({
text: "Exit"
});
button.addEventListener("click", function() {
GTK.exit();
});
table.attach(button, 41, 49, 45, 49);
// create new entry
entry = new GTK.Entry();
table.attach(entry, 1, 40, 45, 49);
entry.addEventListener("enter", function(event) {
console.info(event.target.getText());
});
// create new textbox
text = new GTK.TextBox();
table.attach(text, 1, 49, 8, 44);
// create new radiogroup
radiogroup = new GTK.RadioGroup();
// create new radio (Radio 1)
radio1 = new GTK.RadioBox({
text: "Yes",
group: radiogroup
});
table.attach(radio1, 1, 10, 1, 4);
// create new radio (Radio 2)
radio2 = new GTK.RadioBox({
text: "No",
group: radiogroup
});
table.attach(radio2, 1, 10, 4, 7);
// showing window
win.show();
// focusing entry
entry.focus();
});
GTK.wait();
}
exports.main = main;

View File

@ -8,7 +8,6 @@ var profile = JSON.parse(FILE.readFile("data/test-oss-20231030.json", FILE.CdoCh
// implement the tests
var test_implements = {
// Ref 1: https://gist.github.com/CityRay/c56e4fa874af9370cc1a367bd43095b0
"es5_polyfills": function() {
var parseIntIgnoresLeadingZeros = (function () {
@ -693,6 +692,76 @@ var test_implements = {
"gui_check": function() {
console.log("GUI 환경에서 실행하여 주십시오");
},
// profile: data/test-gtk-server.json
"gtkserver_test": function() {
var GTK = require("lib/gtk");
function main() {
GTK.init(function() {
var win, table, button, entry, text, radiogroup, radio1, radio2;
// create new window
win = new GTK.Window({
title: "WelsonJS GTK GUI Demo Application",
width: 450,
height: 400
});
// create new table
table = new GTK.Table({
rows: 50,
columns: 50
});
win.setContainer(table);
// create new button
button = new GTK.Button({
text: "Exit"
});
button.addEventListener("click", function() {
GTK.exit();
});
table.attach(button, 41, 49, 45, 49);
// create new entry
entry = new GTK.Entry();
table.attach(entry, 1, 40, 45, 49);
entry.addEventListener("enter", function(event) {
console.info(event.target.getText());
});
// create new textbox
text = new GTK.TextBox();
table.attach(text, 1, 49, 8, 44);
// create new radiogroup
radiogroup = new GTK.RadioGroup();
// create new radio (Radio 1)
radio1 = new GTK.RadioBox({
text: "Yes",
group: radiogroup
});
table.attach(radio1, 1, 10, 1, 4);
// create new radio (Radio 2)
radio2 = new GTK.RadioBox({
text: "No",
group: radiogroup
});
table.attach(radio2, 1, 10, 4, 7);
// showing window
win.show();
// focusing entry
entry.focus();
});
GTK.wait();
}
}
};