CSS-DOM
view release on metacpan or search on metacpan
t/property-parser.t view on Meta::CPAN
'close-quote no-open-quote no-close-quote "strine" url(url)',
"no-open-quote no-close-quote 'oetd' url(eeudon\\)) counter(udux)"
." attr(x)",
) {
$s->content($_);
is $s->content, $_, "content value: \L$_"
}
use tests 10; # counter-increment and -reset
for my $prop('increment','reset') {
my $meth = "counter\u$prop";
for('tahi',
'rua toru',
'wha 4 rima 5',
'ono whitu 7',
'waru 8 iwa 9',
) {
$s->$meth($_);
is $s->$meth, $_, "counter-$prop value: \L$_"
}
}
use tests 4; # cue-after and -before
for my $prop('after','before') {
my $meth = "cue\u$prop";
for(qw/ none url(foo) /) {
$s->$meth($_);
is $s->$meth, $_, "cue-$prop value: \L$_"
}
}
use tests 9; # cue
{
my $props = sub {
return join ",", map $s->getPropertyValue("cue-$_"),
qw(before after)
};
$s->cue('url(po)');
is $s->cue, 'url(po)', 'setting cue to one value';
is &$props, 'url(po),url(po)',
'result of setting cue to one value';
$s->cue('none url(sto)');
is $s->cue, 'none url(sto)', 'setting cue to two values';
is &$props, 'none,url(sto)',
'result of setting cue to two values';
$s->cue('none none');
is $s->cue, 'none', 'setting cue to none none';
is &$props, 'none,none',
'result of setting cue to none none';
$s->cue('');
is $s->cue, '', 'setting cue to nothing ...';
is &$props, ',', ' ... resets all its sub-properties';
$s->cue('none');
$s->cueAfter("");
is $s->cue, '',
'cue is blank if not all sub-properties are specified';
}
use tests 17; # cursor
for('url(lous), auto',
'url(os), crosshair',
'url(exe), default',
'url(eelthe), pointer',
'url(oit), move',
'url(ou), e-resize',
'url(ampe), ne-resize',
'url(lon), nw-resize',
'url(ose), n-resize',
'url(rgat), se-resize',
'url(aike), sw-resize',
'url(ryx), s-resize',
'url(ate), w-resize',
'url(tonte), text',
'url(san), wait',
'url(ast), help',
'url(264), url(ech), progress',
) {
$s->cursor($_);
is $s->cursor, $_, "cursor value: \L$_"
}
use tests 2; # direction
for(qw/ ltr rtl /) {
$s->direction($_);
is $s->direction, $_, "direction value: \L$_"
}
use tests 16; # display
for(qw/ inline block list-item run-in inline-block table inline-table
table-row-group table-header-group table-footer-group table-row
table-column-group table-column table-cell table-caption none /) {
$s->display($_);
is $s->display, $_, "display value: \L$_"
}
use tests 6; # elevation
for(qw/ 70deg below level above higher lower /) {
$s->elevation($_);
is $s->elevation, $_, "elevation value: \L$_"
}
use tests 2; # empty-cells
for(qw/ show hide /) {
$s->emptyCells($_);
is $s->emptyCells, $_, "empty-cells value: \L$_"
}
use tests 3; # float
for(qw/ left right none /) {
$s->float($_);
is $s->float, $_, "float value: \L$_"
}
use tests 10; # font-family
for(qw/ serif sans-serif cursive fantasy monospace "Times" Times /,
'Lucida Grande',
'serif, sans-serif, Lucida Grande',
'Lucida Grande, Times, fantasy',
) {
$s->fontFamily($_);
is $s->fontFamily, $_, "font-family value: \L$_"
}
use tests 11; # font-size
for(qw/ xx-small x-small small medium large x-large xx-large larger smaller
5px 5% /) {
$s->fontSize($_);
is $s->fontSize, $_, "font-size value: \L$_"
}
use tests 2; # font-variant
for(qw/ normal small-caps /) {
$s->fontVariant($_);
is $s->fontVariant, $_, "font-variant value: \L$_"
}
use tests 13; # font-weight
for(qw/ normal bold bolder lighter 100 200 300 400 500 600 700 800 900 /) {
$s->fontWeight($_);
( run in 0.626 second using v1.01-cache-2.11-cpan-524268b4103 )