OLD | NEW |
1 // svg/dynamic-updates tests set enablePixelTesting=true, as we want to dump tex
t + pixel results | 1 // svg/dynamic-updates tests set enablePixelTesting=true, as we want to dump tex
t + pixel results |
2 if (self.testRunner) { | 2 if (self.testRunner) { |
3 if (self.enablePixelTesting) | 3 if (self.enablePixelTesting) |
4 testRunner.dumpAsTextWithPixelResults(); | 4 testRunner.dumpAsTextWithPixelResults(); |
5 else | 5 else |
6 testRunner.dumpAsText(); | 6 testRunner.dumpAsText(); |
7 } | 7 } |
8 | 8 |
9 var description, debug, successfullyParsed; | 9 var description, debug, successfullyParsed; |
10 | 10 |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 } | 525 } |
526 | 526 |
527 if (_exception) | 527 if (_exception) |
528 testFailed(_a + " should be defined. Threw exception " + _exception); | 528 testFailed(_a + " should be defined. Threw exception " + _exception); |
529 else if (_av !== undefined) | 529 else if (_av !== undefined) |
530 testPassed(_a + " is defined."); | 530 testPassed(_a + " is defined."); |
531 else | 531 else |
532 testFailed(_a + " should be defined. Was " + _av); | 532 testFailed(_a + " should be defined. Was " + _av); |
533 } | 533 } |
534 | 534 |
| 535 function shouldBeGreaterThan(_a, _b) { |
| 536 if (typeof _a != "string" || typeof _b != "string") |
| 537 debug("WARN: shouldBeGreaterThan expects string arguments"); |
| 538 |
| 539 var _exception; |
| 540 var _av; |
| 541 try { |
| 542 _av = eval(_a); |
| 543 } catch (e) { |
| 544 _exception = e; |
| 545 } |
| 546 var _bv = eval(_b); |
| 547 |
| 548 if (_exception) |
| 549 testFailed(_a + " should be > " + _b + ". Threw exception " + _exception
); |
| 550 else if (typeof _av == "undefined" || _av <= _bv) |
| 551 testFailed(_a + " should be > " + _b + ". Was " + _av + " (of type " + t
ypeof _av + ")."); |
| 552 else |
| 553 testPassed(_a + " is > " + _b); |
| 554 } |
| 555 |
535 function shouldBeGreaterThanOrEqual(_a, _b) { | 556 function shouldBeGreaterThanOrEqual(_a, _b) { |
536 if (typeof _a != "string" || typeof _b != "string") | 557 if (typeof _a != "string" || typeof _b != "string") |
537 debug("WARN: shouldBeGreaterThanOrEqual expects string arguments"); | 558 debug("WARN: shouldBeGreaterThanOrEqual expects string arguments"); |
538 | 559 |
539 var _exception; | 560 var _exception; |
540 var _av; | 561 var _av; |
541 try { | 562 try { |
542 _av = eval(_a); | 563 _av = eval(_a); |
543 } catch (e) { | 564 } catch (e) { |
544 _exception = e; | 565 _exception = e; |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
785 testPassed = function(msg) { | 806 testPassed = function(msg) { |
786 workerPort.postMessage('PASS:' + msg); | 807 workerPort.postMessage('PASS:' + msg); |
787 }; | 808 }; |
788 finishJSTest = function() { | 809 finishJSTest = function() { |
789 workerPort.postMessage('DONE:'); | 810 workerPort.postMessage('DONE:'); |
790 }; | 811 }; |
791 debug = function(msg) { | 812 debug = function(msg) { |
792 workerPort.postMessage(msg); | 813 workerPort.postMessage(msg); |
793 }; | 814 }; |
794 } | 815 } |
OLD | NEW |