Opened 13 years ago
Closed 12 years ago
#6565 closed defect (fixed)
DOH doesn't load _browserRunner.js in sub-frames if Dojo isn't loaded
Reported by: | alex | Owned by: | Eugene Lazutkin |
---|---|---|---|
Priority: | high | Milestone: | 1.3.2 |
Component: | TestFramework | Version: | 1.1.0 |
Keywords: | doh, test harness | Cc: | Dustin Machi |
Blocked By: | Blocking: |
Description
right now, we're dependent on the logic which detects dojo in runner.js to figure out if we can load _browserRunner.js. There's a fallback for Rhino/SM environments but nothing for browsers. This needs to be fixed so that tests loaded via registerUrl() can *not* contain Dojo but will still correctly report their results to the parent frame.
Change History (11)
comment:1 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 Changed 13 years ago by
comment:3 Changed 12 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
This fix causes _browserRunner.js
to be included twice in the main HTML file when dojo is not available, which leads to a host of subtle bugs.
We need to check if it is present, just like we check for runner.js
. Will fix shortly.
comment:4 Changed 12 years ago by
Milestone: | 1.2 → 1.4 |
---|---|
Owner: | changed from alex to Eugene Lazutkin |
Status: | reopened → new |
comment:5 Changed 12 years ago by
Status: | new → assigned |
---|
Another small problem: if several files end with "runner.js" several copies of _browserRunner.js
will be included. Probably the best policy is to do it only once for the first runner.js
.
comment:6 Changed 12 years ago by
Hmm. If dojo is not present both runner.js
and _browserRunner.js
are added by document.write()
. The whole auto-inclusion cycle in runner.js
is completed before a script node for _browserRunner.js
is created => results in one more document.write()
=> now we have two pending script tags for the same file: _browserRunner.js
.
The solution is super-simple --- remove the document.write()
from runner.html
completely: _browserRunner.js
will be added anyway by runner.js
.
comment:7 Changed 12 years ago by
Milestone: | 1.4 → 1.3.2 |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
comment:8 follow-up: 10 Changed 12 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:9 Changed 12 years ago by
comment:10 Changed 12 years ago by
comment:11 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Ah, sorry, false alarm... seems like the problem I am seeing is when the test is run twice w/out shutting down the browser in between. Even though I clear the cache there's some lingering effect w/the applet. I'll take that up w/Mark as a separate ticket.
(In [13356]) ensure that DOH correctly loads _browserRunner.js when pages don't include Dojo. Fixes #6565. !strict