Skip to content

Commit

Permalink
made some patches to recent commits that broke some standard features…
Browse files Browse the repository at this point in the history
…. updated jquery test routines. 1.3.2 now passes 1308 test and runs 1472. timer routines reverted to Justin Meyers implementation as i found the latest didn't really correctly reproduce expected browser behavior. improved ajax error handling and found a number of minor issues with the html implementation. back in the saddle. feels good. pushing to get 99.9 percent of jquery 1.2.6 and 1.3.2 tests passing by jquery conf in september
  • Loading branch information
thatcher committed Aug 19, 2009
1 parent cb6d649 commit 9bc5f5d
Show file tree
Hide file tree
Showing 41 changed files with 1,517 additions and 3,823 deletions.
52 changes: 51 additions & 1 deletion bin/jquery-1.3.2-test.js
Expand Up @@ -3,6 +3,8 @@ load("build/runtest/env.js");

(function($env){

//$env.fixHTML = false;

$env("test/index.html", {
//let it load the script from the html
scriptTypes: {
Expand All @@ -24,9 +26,57 @@ load("build/runtest/env.js");
});
$env.writeToFile(
document.documentElement.xml,
$env.location('jqenv.html')
$env.location('jqenv-'+Date.now()+'.html')
);
};
//allow jquery to run ajax
isLocal = false;


var unsafeStop = stop,
unsafeStart = start,
isStopped = null;

stop = function(){
if(isStopped === null || !isStopped === false){
$env.log('PAUSING QUNIT');
isStopped = true;
unsafeStop(arguments);
}
};
start = function(){
if(isStopped === null || isStopped === true ){
$env.log('RESTARTING QUNIT');
isStopped = false;
unsafeStart(arguments);
}
};
//we know some ajax calls will fail becuase
//we are not running against a running server
//for php files
var handleError = jQuery.handleError;
jQuery.handleError = function(){
ok(false, 'Ajax may have failed while running locally');
try{
handleError(arguments);
}catch(e){}
//allow tests to gracefully continue
start();
};
//allow unanticipated xhr error with no ajax.handleError
//callback (eg jQuery.getScript) to exit gracefully
$env.onInterrupt = function(){
ok(false, 'gracefully continuing test');
start();
};


$env.onScriptLoadError = function(script){
Envjs.error("failed to load script \n"+script.text);
ok(false, 'Ajax may have failed to load correct script while running locally');
//allow tests to gracefully continue
start();
};
}
}
});
Expand Down
4 changes: 2 additions & 2 deletions bin/test-jquery.sh
Expand Up @@ -27,15 +27,15 @@ if [ ! -d "$JQUERY_DIR" ]; then
fi

cp dist/env.rhino.js $JQUERY_DIR/build/runtest/env.js
cp rhino/js.jar $JQUERY_DIR/build/js.jar
cp dist/env-js.jar $JQUERY_DIR/build/js.jar
cp bin/jquery-$VERSION-test.js $JQUERY_DIR/build/runtest/test.js

if [ $DEBUG -eq 1 ]; then
echo 'enabling rhino debugger'
perl -pi~ -e "s/^JAR(.*)(-jar.*|-cp.*)/JAR\1 -cp \\$\{BUILD_DIR}\/js.jar org.mozilla.javascript.tools.debugger.Main/" $JQUERY_DIR/Makefile;
else
echo 'running with rhino'
perl -pi~ -e "s/^JAR(.*)(-jar.*|-cp.*)/JAR\1 -jar \\$\{BUILD_DIR}\/js.jar -w -debug/" $JQUERY_DIR/Makefile;
perl -pi~ -e "s/^JAR(.*)(-jar.*|-cp.*)/JAR\1 -cp \\$\{BUILD_DIR}\/js.jar org.mozilla.javascript.tools.envjs.Main/" $JQUERY_DIR/Makefile;
fi

cd $JQUERY_DIR
Expand Down
2 changes: 1 addition & 1 deletion build.properties
Expand Up @@ -2,7 +2,7 @@
PROJECT: env-js
BUILD_MAJOR: 1
BUILD_MINOR: 0
BUILD_ID: rc1
BUILD_ID: rc2
BUILD: ${PROJECT}.${BUILD_MAJOR}.${BUILD_MINOR}.${BUILD_ID}
VERSION: ${BUILD} ${DSTAMP}

Expand Down
Binary file modified dist/env-js.jar
Binary file not shown.

0 comments on commit 9bc5f5d

Please sign in to comment.