Permalink
Browse files

wait() no longer needs to be called after window.location is set, fra…

…me scripts exectued in correct context, fixed some issues with navigator.userAgent. check out bin/jquery-1.4.1-test.js for good example usage of 1.2.0, still have lots to do but this is much more stable and ready for community use. no longer need to use env-js.jar, just js.jar
  • Loading branch information...
1 parent 9e52a10 commit c1979c93acac4e19c583901e2e5347087f121185 thatcher committed Mar 1, 2010
View
@@ -10,7 +10,7 @@ Envjs({
},
afterScriptLoad:{
'data/testrunner.js': function(){
- console.log('loaded test runner');
+ //console.log('loaded test runner');
//hook into qunit.log
var count = 0,
module;
@@ -39,30 +39,23 @@ Envjs({
Envjs.uri('Envjs.jQuery.1.4.1.html')
);
};
- //spidermonkey and rhino enumerate properties in different orders.
- //qunit.equiv produces an infinite loop if properties are checked
- //in the wrong order (eg parentNode before childNodes) This patch
- //has been submitted to QUnit
- /*QUnit.equiv.callbacks['object'] = function(b,a){
- return b === a;
- };*/
//allow jquery to run ajax
isLocal = false;
jQuery.ajaxSetup({async : false});
//we are breaking becuase our inheritence pattern causes infinite
//recursion somewhere in jsDump;
- /*QUnit.jsDump = {
+ QUnit.jsDump = {
parse: function(thing){
- return 'envjs qunit jsdump bug';//thing+"";
+ return thing+"";
}
- }*/
+ }
var _start = start;
start = function(){
_start();
- Envjs.wait();
+ //Envjs.wait();
};
//we know some ajax calls will fail becuase
@@ -97,6 +90,7 @@ Envjs({
}
});
-window.document.async = false;
+//window.document.async = false;
window.location = 'test/vendor/jQuery/1.4.1/test/index.html';
-Envjs.wait();
+
+
View
@@ -13,7 +13,7 @@ if [ -n "$2" ]; then
if [ -n "$2" ]; then VERSION="$2"; else VERSION="1.4.1"; fi
DEBUG=1
else
- echo 'jquery'
+ #echo 'jquery'
if [ -n "$1" ]; then VERSION="$1"; else VERSION="1.4.1"; fi
DEBUG=0
fi
@@ -48,10 +48,10 @@ case "$VERSION" in
fi
echo 'running jquery 1.4.1 tests'
if [ $DEBUG -eq 1 ]; then
- echo 'enabling rhino debugger'
+ #echo 'enabling rhino debugger'
java -cp rhino/js.jar org.mozilla.javascript.tools.debugger.Main bin/jquery-1.4.1-test.js
else
- echo 'running with rhino'
+ #echo 'running with rhino'
java -Xmx64M -XX:+HeapDumpOnOutOfMemoryError -jar rhino/js.jar -opt -1 bin/jquery-1.4.1-test.js
fi
echo 'completed jquery 1.4.1 tests'
View
@@ -116,6 +116,7 @@
<filterchain>
<replacetokens>
<token key="VERSION" value="core-env.${BUILD_VERSION}"/>
+ <token key="BUILD_VERSION" value="${BUILD_VERSION}"/>
</replacetokens>
</filterchain>
<fileset dir="${SRC_DIR}" includes="platform/core/__global__.js" />
@@ -142,6 +143,7 @@
<filterchain>
<replacetokens>
<token key="VERSION" value="rhino-env.${BUILD_VERSION}"/>
+ <token key="BUILD_VERSION" value="${BUILD_VERSION}"/>
</replacetokens>
</filterchain>
<fileset dir="${SRC_DIR}" includes="platform/rhino/__global__.js" />
@@ -186,6 +188,7 @@
<filterchain>
<replacetokens>
<token key="VERSION" value="console.${BUILD_VERSION}"/>
+ <token key="BUILD_VERSION" value="${BUILD_VERSION}"/>
</replacetokens>
</filterchain>
<fileset dir="${SRC_DIR}" includes="console/__global__.js" />
@@ -223,6 +226,7 @@
<filterchain>
<replacetokens>
<token key="VERSION" value="dom.${BUILD_VERSION}"/>
+ <token key="BUILD_VERSION" value="${BUILD_VERSION}"/>
</replacetokens>
</filterchain>
<fileset dir="${SRC_DIR}" includes="dom/__global__.js" />
@@ -284,6 +288,7 @@
<filterchain>
<replacetokens>
<token key="VERSION" value="event.${BUILD_VERSION}"/>
+ <token key="BUILD_VERSION" value="${BUILD_VERSION}"/>
</replacetokens>
</filterchain>
<fileset dir="${SRC_DIR}" includes="event/__global__.js" />
@@ -330,6 +335,7 @@
<filterchain>
<replacetokens>
<token key="VERSION" value="timer.${BUILD_VERSION}"/>
+ <token key="BUILD_VERSION" value="${BUILD_VERSION}"/>
</replacetokens>
</filterchain>
<fileset dir="${SRC_DIR}" includes="timer/__global__.js" />
@@ -366,6 +372,7 @@
<filterchain>
<replacetokens>
<token key="VERSION" value="html.${BUILD_VERSION}"/>
+ <token key="BUILD_VERSION" value="${BUILD_VERSION}"/>
</replacetokens>
</filterchain>
<fileset dir="${SRC_DIR}" includes="html/__global__.js" />
@@ -453,28 +460,13 @@
<filterchain>
<replacetokens>
<token key="VERSION" value="parser.${BUILD_VERSION}"/>
+ <token key="BUILD_VERSION" value="${BUILD_VERSION}"/>
</replacetokens>
</filterchain>
<fileset dir="${SRC_DIR}" includes="parser/__global__.js" />
- <!--fileset dir="${SRC_DIR}" includes="parser/strings_0.js" />
- <fileset dir="${SRC_DIR}" includes="parser/strings_1.js" />
- <fileset dir="${SRC_DIR}" includes="parser/strings_2.js" />
- <fileset dir="${SRC_DIR}" includes="parser/functions_0.js" />
- <fileset dir="${SRC_DIR}" includes="parser/functions_1.js" />
- <fileset dir="${SRC_DIR}" includes="parser/functions_2.js" />
- <fileset dir="${SRC_DIR}" includes="parser/functions_3.js" />
- <fileset dir="${SRC_DIR}" includes="parser/functions_4.js" />
- <fileset dir="${SRC_DIR}" includes="parser/functions_5.js" />
- <fileset dir="${SRC_DIR}" includes="parser/functions_6.js" />
- <fileset dir="${SRC_DIR}" includes="parser/variables_0.js" />
- <fileset dir="${SRC_DIR}" includes="parser/prototypes.js" /-->
<fileset dir="${SRC_DIR}" includes="common/intro.js" />
<fileset dir="${SRC_DIR}" includes="common/__extend__.js" />
<fileset dir="${SRC_DIR}" includes="common/__setArray__.js" />
- <!--fileset dir="${SRC_DIR}" includes="parser/string_declarations.js" />
- <fileset dir="${SRC_DIR}" includes="parser/function_declarations.js" />
- <fileset dir="${SRC_DIR}" includes="parser/variable_declarations.js" />
- <fileset dir="${SRC_DIR}" includes="parser/factory.js" /-->
<fileset dir="${SRC_DIR}" includes="parser/htmlparser.js" />
<fileset dir="${SRC_DIR}" includes="parser/domparser.js" />
<fileset dir="${SRC_DIR}" includes="parser/document.js" />
@@ -513,6 +505,7 @@
<filterchain>
<replacetokens>
<token key="VERSION" value="xhr.${BUILD_VERSION}"/>
+ <token key="BUILD_VERSION" value="${BUILD_VERSION}"/>
</replacetokens>
</filterchain>
<fileset dir="${SRC_DIR}" includes="xhr/__global__.js" />
@@ -555,6 +548,7 @@
<filterchain>
<replacetokens>
<token key="VERSION" value="css.${BUILD_VERSION}"/>
+ <token key="BUILD_VERSION" value="${BUILD_VERSION}"/>
</replacetokens>
</filterchain>
<fileset dir="${SRC_DIR}" includes="css/__global__.js" />
@@ -597,6 +591,7 @@
<filterchain>
<replacetokens>
<token key="VERSION" value="window.${BUILD_VERSION}"/>
+ <token key="BUILD_VERSION" value="${BUILD_VERSION}"/>
</replacetokens>
</filterchain>
<fileset dir="${SRC_DIR}" includes="window/__global__.js" />
@@ -641,6 +636,7 @@
<filterchain>
<replacetokens>
<token key="VERSION" value="${BUILD_VERSION}"/>
+ <token key="BUILD_VERSION" value="${BUILD_VERSION}"/>
</replacetokens>
</filterchain>
<fileset dir="${DIST_DIR}" includes="platform/core.js" />
@@ -662,6 +658,7 @@
<filterchain>
<replacetokens>
<token key="VERSION" value="env-${BUILD_VERSION}"/>
+ <token key="BUILD_VERSION" value="${BUILD_VERSION}"/>
</replacetokens>
</filterchain>
<fileset dir="${DIST_DIR}" includes="platform/core.js" />
@@ -679,61 +676,4 @@
<echo message="${ENV_RHINO} built." />
</target>
- <target name="test" description="Run the tests">
- <java fork="true" jar="${DIST_DIR}/env-js.jar" failonerror="true">
- <arg value="-opt"/>
- <arg value="-1"/>
- <arg value="test/test.js"/>
- <arg value="envjs"/>
- <arg value="primary-tests"/>
- <jvmarg value="-Dfile.encoding=utf-8"/>
- <jvmarg value="-Xmx256m"/>
- </java>
- <java fork="true" jar="${DIST_DIR}/env-js.jar" failonerror="true">
- <arg value="-opt"/>
- <arg value="-1"/>
- <arg value="test/test.js"/>
- <arg value="envjs"/>
- <arg value="call-load-test"/>
- <jvmarg value="-Dfile.encoding=utf-8"/>
- <jvmarg value="-Xmx256m"/>
- </java>
- <java fork="true" jar="${DIST_DIR}/env-js.jar" failonerror="true">
- <arg value="-opt"/>
- <arg value="-1"/>
- <arg value="test/test.js"/>
- <arg value="envjs"/>
- <arg value="prototype-test"/>
- <jvmarg value="-Dfile.encoding=utf-8"/>
- <jvmarg value="-Xmx256m"/>
- </java>
- <java fork="true" jar="${RHINO_JAR}" failonerror="true">
- <arg value="-opt"/>
- <arg value="-1"/>
- <arg value="test/test.js"/>
- <arg value="rhino"/>
- <arg value="primary-tests"/>
- <jvmarg value="-Dfile.encoding=utf-8"/>
- <jvmarg value="-Xmx256m"/>
- </java>
- <java fork="true" jar="${RHINO_JAR}" failonerror="true">
- <arg value="-opt"/>
- <arg value="-1"/>
- <arg value="test/test.js"/>
- <arg value="rhino"/>
- <arg value="call-load-test"/>
- <jvmarg value="-Dfile.encoding=utf-8"/>
- <jvmarg value="-Xmx256m"/>
- </java>
- <java fork="true" jar="${RHINO_JAR}" failonerror="true">
- <arg value="-opt"/>
- <arg value="-1"/>
- <arg value="test/test.js"/>
- <arg value="rhino"/>
- <arg value="prototype-test"/>
- <jvmarg value="-Dfile.encoding=utf-8"/>
- <jvmarg value="-Xmx256m"/>
- </java>
- </target>
-
</project>
View
@@ -309,7 +309,7 @@ __extend__(NamedNodeMap.prototype, {
return ret;
},
setNamedItem : function(arg) {
- //console.log('setNamedItem %s', arg);
+ //console.log('setNamedItem %s', arg);
// test for exceptions
if (__ownerDocument__(this).implementation.errorChecking) {
// throw Exception if arg was not created by this Document
Oops, something went wrong.

0 comments on commit c1979c9

Please sign in to comment.