Opened 12 years ago
Closed 12 years ago
#3856 closed defect (fixed)
dijit doh tests interfere with each other and cause errors
Reported by: | simonjb | Owned by: | bill |
---|---|---|---|
Priority: | high | Milestone: | 0.9 |
Component: | TestFramework | Version: | 0.9 |
Keywords: | Cc: | bill | |
Blocked By: | Blocking: |
Description
The dijit doh unit test for _base.manager is causing other dijit tests to exhibit errors in the doh browser runner (util/doh/runner.html?testModule=dijit.tests.module). I'm not sure if this is a doh issue or a dijit issue. I've filed it under the TestFramework component for now but please move as appropriate.
On FF2:
If I comment out:
dojo.require("dijit.tests._base.manager");
in module.js then all tests pass except ContentPane, which has 4 failures (same as when run by itself).
If I run all the tests together then the _base.manager test passes but a number of others fail with an error (doesn't always seem to be the same tests):
Error: Deferred(unfired)
In IE7:
If I comment out:
dojo.require("dijit.tests._base.manager");
in module.js then all tests pass except ContentPane, which has 4 failures (same as when run by itself), and Form, which has 1 failure (same as when run by itelf).
If I run all the tests together then I see a number of these errors:
Can't execute code from a freed script
I did a little bit of investigation and _base/manager.js is different from the other tests. Its tests are not stored in an HTML file (loaded with a doh.registerUrl() call) but rather are directly in the manager.js file. I also messed with manager.js a bit and the minimal file that will cause errors is:
dojo.provide("dijit.tests._base.manager"); dojo.require("dijit._Widget");
If the dojo.require("dijit._Widget") statement is removed then the other tests are unaffected.
On Safari 3 other tests are affected less by the inclusion of the _base.manager test. All run fine except that ContentPane sometimes has 5 failures instead of 4.
Change History (8)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
Replying to simonjb:
If I comment out:
dojo.require("dijit.tests._base.manager");in module.js then all tests pass except ContentPane, which has 4 failures (same as when run by itself).
Hum, it works by it self for me. http://archive.dojotoolkit.org/nightly/dojotoolkit/dijit/tests/layout/ContentPane.html
Actually the combined test work to if I uncheck dijit.tests._Templated and press the play button again. It needs to run (and fail) on the first parse though. http://archive.dojotoolkit.org/nightly/dojotoolkit/util/doh/runner.html?testModule=dijit.tests.module
Can you provide some more info on which tests that fails in ContentPane?.html? And what output you get.
Note that xhrGet prints errors in console when you cancel a inflight download. See #3507, I don't see how squelsh that outside of xhrGet. So don't confuse those error prints with test passing or not.
comment:3 Changed 12 years ago by
(In [9805]) Quiting a E_NOTICE message that causes ContentPane?.html test to fail in some environments thanks to simonjb for finding it! refs #3856
comment:5 Changed 12 years ago by
I confirm that the ContentPane.html tests are now passing for me on FF2, IE6, and IE7.
(still seeing the interaction problem with dijit.tests._base.manager)
comment:6 Changed 12 years ago by
Owner: | changed from alex to bill |
---|
comment:7 Changed 12 years ago by
Status: | new → assigned |
---|
Talked to Alex. Tests *w/out* an html file are run in the main browser window, and their effects will linger. So if test1 and test2 both do a dojo.require("foo") the second test won't load anything because the first test already loaded foo.
Easiest solution here is probably to put the manager tests in a separate html file. Although this may indicate a bug when dijit is loaded in the main window and an iframe.
comment:8 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Apparently each test is not being run in it's own sandbox/iframe? Note that dijit._Widget includes the code in dijit._base, which actually runs some stuff (like browser sniffing), so it can't be included twice. I don't know why it would be included twice, but I maybe that's happening somehow.