Tuning to prevent stack overflows in FF

This commit is contained in:
ragaskar 2009-10-05 22:36:10 -07:00
parent 250c483a6b
commit 73c0d57c94
29 changed files with 2106 additions and 2038 deletions

View File

@ -15,7 +15,6 @@
var jsApiReporter;
(function() {
var jasmineEnv = jasmine.getEnv();
jasmineEnv.updateInterval = 1000;
jsApiReporter = new jasmine.JsApiReporter();
var trivialReporter = new jasmine.TrivialReporter();

View File

@ -258,7 +258,7 @@ ul.inheritsList
</div>
<div class="fineprint" style="clear:both">
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blankt">JsDoc Toolkit</a> 2.1.0 on Tue Sep 29 2009 22:08:06 GMT-0700 (PDT)
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blankt">JsDoc Toolkit</a> 2.1.0 on Mon Oct 05 2009 22:35:02 GMT-0700 (PDT)
</div>
</body>
</html>

View File

@ -300,7 +300,7 @@ ul.inheritsList
</div>
<div class="fineprint" style="clear:both">
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blankt">JsDoc Toolkit</a> 2.1.0 on Tue Sep 29 2009 22:08:06 GMT-0700 (PDT)
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blankt">JsDoc Toolkit</a> 2.1.0 on Mon Oct 05 2009 22:35:02 GMT-0700 (PDT)
</div>
</body>
</html>

View File

@ -908,7 +908,7 @@ A convenience method that allows existing specs to be disabled temporarily durin
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Sep 29 2009 22:08:05 GMT-0700 (PDT)
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Mon Oct 05 2009 22:35:01 GMT-0700 (PDT)
</div>
</body>
</html>

View File

@ -339,7 +339,7 @@ ul.inheritsList
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Sep 29 2009 22:08:05 GMT-0700 (PDT)
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Mon Oct 05 2009 22:35:01 GMT-0700 (PDT)
</div>
</body>
</html>

View File

@ -507,7 +507,7 @@ ul.inheritsList
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Sep 29 2009 22:08:05 GMT-0700 (PDT)
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Mon Oct 05 2009 22:35:01 GMT-0700 (PDT)
</div>
</body>
</html>

View File

@ -316,7 +316,7 @@ ul.inheritsList
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Sep 29 2009 22:08:05 GMT-0700 (PDT)
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Mon Oct 05 2009 22:35:01 GMT-0700 (PDT)
</div>
</body>
</html>

View File

@ -316,7 +316,7 @@ ul.inheritsList
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Sep 29 2009 22:08:05 GMT-0700 (PDT)
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Mon Oct 05 2009 22:35:01 GMT-0700 (PDT)
</div>
</body>
</html>

View File

@ -700,7 +700,7 @@ ul.inheritsList
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Sep 29 2009 22:08:05 GMT-0700 (PDT)
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Mon Oct 05 2009 22:35:01 GMT-0700 (PDT)
</div>
</body>
</html>

View File

@ -316,7 +316,7 @@ ul.inheritsList
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Sep 29 2009 22:08:05 GMT-0700 (PDT)
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Mon Oct 05 2009 22:35:01 GMT-0700 (PDT)
</div>
</body>
</html>

View File

@ -418,7 +418,7 @@ ul.inheritsList
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Sep 29 2009 22:08:05 GMT-0700 (PDT)
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Mon Oct 05 2009 22:35:01 GMT-0700 (PDT)
</div>
</body>
</html>

View File

@ -396,7 +396,7 @@ ul.inheritsList
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Sep 29 2009 22:08:05 GMT-0700 (PDT)
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Mon Oct 05 2009 22:35:02 GMT-0700 (PDT)
</div>
</body>
</html>

View File

@ -845,7 +845,7 @@ expect(foo.bar.callCount).toEqual(0);</pre>
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Sep 29 2009 22:08:06 GMT-0700 (PDT)
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Mon Oct 05 2009 22:35:02 GMT-0700 (PDT)
</div>
</body>
</html>

View File

@ -436,7 +436,7 @@ ul.inheritsList
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Sep 29 2009 22:08:06 GMT-0700 (PDT)
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Mon Oct 05 2009 22:35:02 GMT-0700 (PDT)
</div>
</body>
</html>

View File

@ -266,6 +266,29 @@ ul.inheritsList
<table class="summaryTable" cellspacing="0" summary="A summary of the fields documented in the class jasmine.">
<caption>Field Summary</caption>
<thead>
<tr>
<th scope="col">Field Attributes</th>
<th scope="col">Field Name and Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="attributes">&lt;static&gt; &nbsp;</td>
<td class="nameDescription">
<div class="fixedFont">
jasmine.<b><a href="../symbols/jasmine.html#.UPDATE_INTERVAL">UPDATE_INTERVAL</a></b>
</div>
<div class="description">Large or small values here may result in slow test running & "Too much recursion" errors</div>
</td>
</tr>
</tbody>
</table>
@ -389,6 +412,33 @@ Jasmine environment.</div>
<!-- ============================== field details ========================== -->
<div class="sectionTitle">
Field Detail
</div>
<a name=".UPDATE_INTERVAL"> </a>
<div class="fixedFont">&lt;static&gt;
<span class="light">jasmine.</span><b>UPDATE_INTERVAL</b>
</div>
<div class="description">
Large or small values here may result in slow test running & "Too much recursion" errors
</div>
<!-- ============================== method details ========================= -->
@ -678,7 +728,7 @@ Jasmine environment.
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Sep 29 2009 22:08:05 GMT-0700 (PDT)
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Mon Oct 05 2009 22:35:01 GMT-0700 (PDT)
</div>
</body>
</html>

View File

@ -316,7 +316,7 @@ ul.inheritsList
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Sep 29 2009 22:08:06 GMT-0700 (PDT)
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Mon Oct 05 2009 22:35:02 GMT-0700 (PDT)
</div>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@ -12,6 +12,12 @@ jasmine.unimplementedMethod_ = function() {
throw new Error("unimplemented method");
};
/**
* Large or small values here may result in slow test running & "Too much recursion" errors
*
*/
jasmine.UPDATE_INTERVAL = 250;
/**
* Allows for bound functions to be comapred. Internal use only.
*
@ -517,7 +523,7 @@ jasmine.version_= {
"major": 0,
"minor": 9,
"build": 0,
"revision": 1254287286
"revision": 1254807302
};
/**
* @namespace
@ -591,9 +597,7 @@ jasmine.Env = function() {
this.reporter = new jasmine.MultiReporter();
this.updateInterval = 0;
this.updateInterval = 0;
this.updateInterval = jasmine.UPDATE_INTERVAL
this.lastUpdate = 0;
this.specFilter = function() {
return true;

View File

@ -1,10 +1,12 @@
describe("jasmine.Env", function() {
var env;
beforeEach(function() {
env = new jasmine.Env();
env.updateInterval = 0;
});
describe('ids', function () {
var env;
beforeEach(function() {
env = new jasmine.Env();
});
it('nextSpecId should return consecutive integers, starting at 0', function () {
expect(env.nextSpecId()).toEqual(0);
expect(env.nextSpecId()).toEqual(1);
@ -18,11 +20,9 @@ describe("jasmine.Env", function() {
});
});
describe("reporting", function() {
var env;
var fakeReporter;
beforeEach(function() {
env = new jasmine.Env();
fakeReporter = jasmine.createSpyObj("fakeReporter", ["log"]);
});
@ -36,7 +36,7 @@ describe("jasmine.Env", function() {
afterEach(function () {
jasmine.version_ = oldVersion;
});
it('should raise an error if version is not set', function () {
jasmine.version_ = null;
var exception;

View File

@ -3,6 +3,7 @@ describe('Exceptions:', function() {
beforeEach(function() {
env = new jasmine.Env();
env.updateInterval = 0;
});
it('jasmine.formatException formats Firefox exception maessages as expected', function() {

View File

@ -6,6 +6,7 @@ describe('jasmine.jsApiReporter', function() {
beforeEach(function() {
var env = new jasmine.Env();
env.updateInterval = 0;
var suite = new jasmine.Suite(env);
spec1 = new jasmine.Spec(env, suite, 'spec 1');
spec1.runs(function () {

View File

@ -3,6 +3,7 @@ describe("jasmine.Matchers", function() {
beforeEach(function() {
env = new jasmine.Env();
env.updateInterval = 0;
});
function match(value) {

View File

@ -4,7 +4,7 @@ describe('jasmine.Reporter', function() {
beforeEach(function() {
env = new jasmine.Env();
env.updateInterval = 0;
});
it('should get called from the test runner', function() {

View File

@ -4,6 +4,7 @@ describe('RunnerTest', function() {
beforeEach(function() {
env = new jasmine.Env();
env.updateInterval = 0;
fakeTimer = new jasmine.FakeTimer();
env.setTimeout = fakeTimer.setTimeout;

View File

@ -4,6 +4,7 @@ describe("jasmine spec running", function () {
beforeEach(function() {
env = new jasmine.Env();
env.updateInterval = 0;
fakeTimer = new jasmine.FakeTimer();
env.setTimeout = fakeTimer.setTimeout;

View File

@ -2,6 +2,7 @@ describe('Spec', function () {
var env, suite;
beforeEach(function() {
env = new jasmine.Env();
env.updateInterval = 0;
suite = new jasmine.Suite(env, 'suite 1');
});
@ -76,34 +77,34 @@ describe('Spec', function () {
});
describe('results.passed', function () {
it('is true if all spec expectations pass', function () {
spec.runs(function () {
this.expect(true).toEqual(true);
it('is true if all spec expectations pass', function () {
spec.runs(function () {
this.expect(true).toEqual(true);
});
spec.execute();
expect(results.passed()).toEqual(true);
});
spec.execute();
expect(results.passed()).toEqual(true);
});
it('is false if one spec expectation fails', function () {
spec.runs(function () {
this.expect(true).toEqual(false);
spec.runs(function () {
this.expect(true).toEqual(false);
});
spec.execute();
expect(results.passed()).toEqual(false);
});
spec.execute();
expect(results.passed()).toEqual(false);
});
it('a spec with no expectations will return true', function () {
var specWithoutExpectations = new jasmine.Spec(env, suite);
specWithoutExpectations.runs(function() {
it('a spec with no expectations will return true', function () {
var specWithoutExpectations = new jasmine.Spec(env, suite);
specWithoutExpectations.runs(function() {
});
specWithoutExpectations.execute();
expect(results.passed()).toEqual(true);
});
specWithoutExpectations.execute();
expect(results.passed()).toEqual(true);
});
it('an unexecuted spec will return true', function () {
expect(results.passed()).toEqual(true);
});
it('an unexecuted spec will return true', function () {
expect(results.passed()).toEqual(true);
});
});
});
});

View File

@ -4,6 +4,7 @@ describe('Suite', function() {
beforeEach(function() {
env = new jasmine.Env();
env.updateInterval = 0;
fakeTimer = new jasmine.FakeTimer();
env.setTimeout = fakeTimer.setTimeout;

View File

@ -11,9 +11,7 @@ jasmine.Env = function() {
this.reporter = new jasmine.MultiReporter();
this.updateInterval = 0;
this.updateInterval = 0;
this.updateInterval = jasmine.UPDATE_INTERVAL
this.lastUpdate = 0;
this.specFilter = function() {
return true;

View File

@ -12,6 +12,12 @@ jasmine.unimplementedMethod_ = function() {
throw new Error("unimplemented method");
};
/**
* Large or small values here may result in slow test running & "Too much recursion" errors
*
*/
jasmine.UPDATE_INTERVAL = 250;
/**
* Allows for bound functions to be comapred. Internal use only.
*