Skip to content

Commit

Permalink
Merge branch 'envjsrb' of github.com:smparkes/env-js into envjsrb
Browse files Browse the repository at this point in the history
  • Loading branch information
smparkes committed Feb 6, 2010
2 parents 78786f1 + dfb5e51 commit 965db6e
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 11 deletions.
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

8 changes: 4 additions & 4 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ namespace :johnson do

desc "run tests against johnson"
task :test => :compile do
ruby "-Ilib:vendor/johnson/lib bin/envjsrb test/primary-tests.js"
ruby "-Ilib:vendor/johnson/lib bin/envjsrb test/prototype-test.js"
ruby "-Ilib:vendor/johnson/lib bin/envjsrb test/call-load-test.js"
ruby "bin/envjsrb test/primary-tests.js"
ruby "bin/envjsrb test/prototype-test.js"
ruby "bin/envjsrb test/call-load-test.js"
end

end
Expand All @@ -70,7 +70,7 @@ begin
s.email = "smparkes@smparkes.net" # Just for the ruby part ...
s.homepage = "http://github.com/thatcher/env-js"
s.description = "Browser environment for javascript interpreters"
s.authors = ["John Resig", "Chris Thatcher" ]
s.authors = ["John Resig", "Chris Thatcher", "Steven Parkes" ]
s.add_dependency "johnson", ">= 2.0.0.pre0"
s.files =
FileList[ "",
Expand Down
7 changes: 5 additions & 2 deletions src/dom/document.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,11 @@ __extend__(DOMDocument.prototype, {
xhr = ({
open: function(){},
send: function(){
this.responseText = content;
this.onreadystatechange();
var self = this;
setTimeout(function(){
self.responseText = content;
self.onreadystatechange();
},0);
},
status: 200
});
Expand Down
3 changes: 2 additions & 1 deletion src/intro.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
$platform.init_window = function(window) {
var index = master.window_index++;
window.toString = function(){
return "[object Window "+index+"]";
// return "[object Window "+index+"]";
return "[object Window]";
};
};

Expand Down
6 changes: 6 additions & 0 deletions test/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ url_escaped = "data:text/html,"+escape(doc);
base64 = "data:text/html;base64,"+Base64.encode(doc);
debug(url_escaped);
window.location = "about:blank";
Envjs.wait();
window.location = url_escaped;
Envjs.wait();
debug(window.document.documentElement.innerHTML);
if(window.document.documentElement.innerHTML != inner){
debug(window.document.documentElement.innerHTML);
Expand All @@ -15,13 +17,17 @@ if(window.document.documentElement.innerHTML != inner){
}
debug(base64);
window.location = "about:blank";
Envjs.wait();
window.location = base64;
Envjs.wait();
debug(window.document.documentElement.innerHTML);
if(window.document.documentElement.innerHTML != inner){
throw new Error("b"+window.document.documentElement.innerHTML);
}
window.location = "about:blank";
Envjs.wait();
window.location = "data:,"+escape("Hello, World from a data uri!");
Envjs.wait();
debug(window.location+"");
debug(window.document.documentElement.innerHTML);
inner = "<head><title></title></head><body>Hello, World from a data uri!</body>";
Expand Down
1 change: 0 additions & 1 deletion vendor/johnson
Submodule johnson deleted from 99d62b

0 comments on commit 965db6e

Please sign in to comment.