Skip to content

Commit

Permalink
Merge branch 'master' of git@github.com:thatcher/env-js
Browse files Browse the repository at this point in the history
  • Loading branch information
thatcher committed May 27, 2009
2 parents 0e7b5d3 + 8c2dd56 commit 444151a
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
@@ -0,0 +1 @@
dist/env.*.js
Binary file added rhino/js-1.7R2.jar
Binary file not shown.
11 changes: 11 additions & 0 deletions test/test.js
@@ -1,6 +1,17 @@
// Init
load("dist/env.rhino.js");

// Must upgrade Rhino to 1.7R2 for this function to work.
// function crankyLoad() {
// var context = Packages.org.mozilla.javascript.Context.currentContext;
// var SourceReader = Packages.org.mozilla.javascript.tools.SourceReader;
//
// for(var i=0; i < arguments.length; i++) {
// var filename = arguments[i];
// var source = SourceReader.readFileOrUrl(filename, true, "UTF-8");
// context.evaluateString(this, source, filename, 0, null);
// }
// }

window.onload = function(){
print("Handling onload for test.js");
Expand Down
10 changes: 9 additions & 1 deletion test/unit/prototypecompat.js
Expand Up @@ -10,5 +10,13 @@ test("$ method", function(){

test("$$ method", function(){
expect(1);
ok($$(".chain").length == 10, "$$ found correct number of elements")
ok($$(".chain").length == 10, "$$ found correct number of elements");
});

// When this failing test passes, ticket #69 can be closed.
// (http://envjs.lighthouseapp.com/projects/21590-envjs/tickets/69-prototypes-down-method-is-unavailable)
//
// test("down method", function(){
// expect(1);
// ok($('main').down('#foo') != undefined, "$('main').down('#foo') successfully found an element");
// });

0 comments on commit 444151a

Please sign in to comment.