mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
4d1497d7cf
+ Fixed some of the tab sizing issues (like when returning from a tab)
55 lines
1.2 KiB
JavaScript
55 lines
1.2 KiB
JavaScript
// Title: test.js (revision-a)
|
|
|
|
(function(){
|
|
|
|
var testsRun = 0;
|
|
var testsFailed = 0;
|
|
|
|
// ----------
|
|
function ok(value, message) {
|
|
testsRun++;
|
|
if(!value) {
|
|
Utils.log('test failed: ' + message);
|
|
testsFailed ++;
|
|
}
|
|
}
|
|
|
|
// ----------
|
|
function is(actual, expected, message) {
|
|
ok(actual == expected, message + '; actual = ' + actual + '; expected = ' + expected);
|
|
}
|
|
|
|
// ----------
|
|
function isnot(actual, unexpected, message) {
|
|
ok(actual != unexpected, message + '; actual = ' + actual + '; unexpected = ' + unexpected);
|
|
}
|
|
|
|
// ----------
|
|
function test() {
|
|
try {
|
|
Utils.log('unit tests starting -----------');
|
|
|
|
var $div = iQ('<div>');
|
|
ok($div, '$div');
|
|
|
|
is($div.css('padding-left'), '0px', 'padding-left initial');
|
|
var value = '10px';
|
|
$div.css('padding-left', value);
|
|
is($div.css('padding-left'), value, 'padding-left set');
|
|
|
|
is($div.css('z-index'), 'auto', 'z-index initial');
|
|
value = 50;
|
|
$div.css('zIndex', value);
|
|
is($div.css('z-index'), value, 'z-index set');
|
|
is($div.css('zIndex'), value, 'zIndex set');
|
|
|
|
Utils.log('unit tests done', testsRun, (testsFailed ? testsFailed + ' tests failed!!' : ''));
|
|
} catch(e) {
|
|
Utils.log(e);
|
|
}
|
|
}
|
|
|
|
test();
|
|
|
|
})();
|