Ticket #7873: selector_tests.diff
| File selector_tests.diff, 1.2 kB (added by savetheclocktower, 1 year ago) |
|---|
-
test/unit/selector.html
old new 298 298 assertEnumEqual([$('link_2')], $$('#p *:nth-last-child(2)'), 'nth-last-child'); 299 299 assertEnumEqual([$('link_2')], $$('#p *:nth-child(3)'), 'nth-child'); 300 300 assertEnumEqual([$('link_2')], $$('#p a:nth-child(3)'), 'nth-child'); 301 assertEnumEqual($('item_2', 'item_3'), $$('#list > li:nth-child(n+2)')); 302 assertEnumEqual($('item_1', 'item_2'), $$('#list > li:nth-child(-n+2)')); 301 303 $RunBenchmarks && wait(500, function() { 302 304 benchmark(function() { $$('#level1 *:first-child') }, 1000, ':first-child'); 303 305 benchmark(function() { $$('#level1 *:last-child') }, 1000, ':last-child'); … … 346 348 assertEnumEqual($$('ul > li:first-child'), $$('ul > li:nth-child(1)')); 347 349 assertEnumEqual($$('ul > li:last-child'), $$('ul > li:nth-last-child(1)')); 348 350 assertEnumEqual($$('#troubleForm *:enabled'), $$('#troubleForm *:not(:disabled)')); 351 assertEnumEqual($$('ul > li:nth-child(n-999)'), $$('ul > li')); 349 352 }}, 350 353 351 354 testSelectorsThatShouldReturnNothing: function() {with(this) {