diff --git a/specs/fulldoc/boot.js b/specs/fulldoc/boot.js new file mode 100644 index 00000000..701d3f93 --- /dev/null +++ b/specs/fulldoc/boot.js @@ -0,0 +1,23 @@ + +/** + * @author thatcher + */ +var myprint = print; +load('dist/env.rhino.js'); + + +Envjs({ + scriptTypes: { "text/javascript": true }, +}); +window.location = 'specs/fulldoc/index.html'; + +var div = window.document.getElementById('qunit-testresult'); +print("DIV = " + div); +var spans = div.getElementsByTagName('SPAN') + +var summary = {}; +for (var i = 0; i < spans.length; ++i) { + var clazz = spans[i].getAttribute('class'); + summary[clazz] = parseInt(spans[i].textContent); + print(clazz + ' = ' + summary[clazz]); +} diff --git a/specs/fulldoc/index.html b/specs/fulldoc/index.html new file mode 100644 index 00000000..c3e4c85b --- /dev/null +++ b/specs/fulldoc/index.html @@ -0,0 +1,41 @@ + + + + + Envjs Parser Spec + + + + + + + + + + +

+ + Envjs Parser Spec +

+

+

+
+
+
    +
    + + + diff --git a/specs/fulldoc/spec.js b/specs/fulldoc/spec.js new file mode 100644 index 00000000..b4b26bd8 --- /dev/null +++ b/specs/fulldoc/spec.js @@ -0,0 +1,46 @@ +QUnit.module('integration'); + +/** + * This is very different from the other tests in that the "work" + * in done, //outside// of a test(). The test() just check the + * final results. This is needed since the tests must run in + * tag of the main document. + */ + +var isenvjs; +try { + isenvjs = runningUnderEnvjs(); +} catch (e) { + isenvjs= false; +} +/** + * If a script in running in , then document.body === null + * + * Due to frame scoping rules, we have indirectly make the test. + * What we are really doing is this: + * + */ +document.bodyinhead = document.body; + +/** + * in + * Create a new