From d8ba99d7d274643636b35b6cae03b8a6c097c810 Mon Sep 17 00:00:00 2001 From: Jos Shepherd Date: Sun, 20 Jun 2010 12:23:25 +0100 Subject: [PATCH] Test and examples use new library path --- example/browser/browser.js | 4 ++-- example/jquery/run.js | 4 ++-- example/node-xml/run.js | 2 +- example/pure/run.js | 34 +++++++++++++++++----------------- example/sizzle/run.js | 4 ++-- test/runner.js | 12 ++++++------ 6 files changed, 30 insertions(+), 30 deletions(-) diff --git a/example/browser/browser.js b/example/browser/browser.js index 2363e3475b..b650794d8f 100644 --- a/example/browser/browser.js +++ b/example/browser/browser.js @@ -1,8 +1,8 @@ var sys = require('sys'); -var dom = require('../../lib/level1/core').dom.level1.core; -var browser = require('../../lib/browser/index').windowAugmentation(dom); +var dom = require('../../lib/jsdom/level1/core').dom.level1.core; +var browser = require('../../lib/jsdom/browser/index').windowAugmentation(dom); var document = browser.document; var window = browser.window; diff --git a/example/jquery/run.js b/example/jquery/run.js index e4a6fbe752..914de7ec60 100644 --- a/example/jquery/run.js +++ b/example/jquery/run.js @@ -1,7 +1,7 @@ var sys = require("sys"), fs = require("fs"); -var dom = require("../../lib/level1/core").dom.level1.core; -var window = require("../../lib/browser").windowAugmentation(dom).window; +var dom = require("../../lib/jsdom/level1/core").dom.level1.core; +var window = require("../../lib/jsdom/browser").windowAugmentation(dom).window; var document = window.document; var location = window.location; var navigator = window.navigator; diff --git a/example/node-xml/run.js b/example/node-xml/run.js index 51f9017be1..cff4521d0f 100644 --- a/example/node-xml/run.js +++ b/example/node-xml/run.js @@ -1,5 +1,5 @@ var sys = require('sys'); -process.mixin(GLOBAL, require("../../lib/level1/core").dom.level1.core); +process.mixin(GLOBAL, require("../../lib/jsdom/level1/core").dom.level1.core); // git clone git://github.com/robrighter/node-xml.git into ~/.node_libraries var xml = require("node-xml/lib/node-xml"); diff --git a/example/pure/run.js b/example/pure/run.js index 9423da642a..4a2d273c57 100644 --- a/example/pure/run.js +++ b/example/pure/run.js @@ -1,5 +1,5 @@ -var browser = require("../../lib/browser"); -var dom = new browser.browserAugmentation(require("../../lib/level1/core").dom.level1.core); +var browser = require("../../lib/jsdom/browser"); +var dom = new browser.browserAugmentation(require("../../lib/jsdom/level1/core").dom.level1.core); var sax = require("./sax"); var sys = require("sys"); @@ -63,21 +63,21 @@ dom.Element.prototype.__defineSetter__('innerHTML', function(html) { var doc = new dom.Document("html"); -var implementation = new dom.DOMImplementation(doc, { - "HTML" : "1.0", - "DisableLiveLists" : "1.0" -}); - -var notations = new dom.NotationNodeMap( - doc, - doc.createNotationNode("notation1","notation1File", null), - doc.createNotationNode("notation2",null, "notation2File") -); - -var entities = new dom.EntityNodeMap(doc); - -var doctype = new dom.DocumentType(doc, "html", entities, notations); -doc.doctype = doctype; +var implementation = new dom.DOMImplementation(doc, { + "HTML" : "1.0", + "DisableLiveLists" : "1.0" +}); + +var notations = new dom.NotationNodeMap( + doc, + doc.createNotationNode("notation1","notation1File", null), + doc.createNotationNode("notation2",null, "notation2File") +); + +var entities = new dom.EntityNodeMap(doc); + +var doctype = new dom.DocumentType(doc, "html", entities, notations); +doc.doctype = doctype; doc.implementation = implementation; doc.innerHTML = '
'; diff --git a/example/sizzle/run.js b/example/sizzle/run.js index 88179ab011..202cc3ada1 100644 --- a/example/sizzle/run.js +++ b/example/sizzle/run.js @@ -1,5 +1,5 @@ -var browser = require("../../lib/browser"); -var dom = browser.browserAugmentation(require("../../lib/level1/core").dom.level1.core); +var browser = require("../../lib/jsdom/browser"); +var dom = browser.browserAugmentation(require("../../lib/jsdom/level1/core").dom.level1.core); var sys = require("sys"); diff --git a/test/runner.js b/test/runner.js index 21d785547f..a02b6b81f9 100644 --- a/test/runner.js +++ b/test/runner.js @@ -20,7 +20,7 @@ var mixin = function(target) { return target; }; -mixin(global, require("../lib/level1/core").dom.level1.core); +mixin(global, require("../lib/jsdom/level1/core").dom.level1.core); mixin(global, require(__dirname + "/mjsunit")); mixin(global, require("./DOMTestCase")); @@ -73,7 +73,7 @@ var suites = { } }, "level2/core" : { cases: require("./level2/core").tests, setUp : function() { - mixin(global, require("../lib/level2/core").dom.level2.core); + mixin(global, require("../lib/jsdom/level2/core").dom.level2.core); global.builder.contentType = "text/xml"; global.builder.type = "xml"; global.builder.testDirectory = "level2/core"; @@ -81,8 +81,8 @@ var suites = { } }, "browser" : { cases: require("./browser").tests, setUp : function() { - global.dom = require(__dirname + "/../lib/level1/core").dom.level1.core; - global.browser = require(__dirname + "/../lib/browser").browserAugmentation(dom); + global.dom = require(__dirname + "/../lib/jsdom/level1/core").dom.level1.core; + global.browser = require(__dirname + "/../lib/jsdom/browser").browserAugmentation(dom); global.builder.contentType = "text/html"; @@ -91,8 +91,8 @@ var suites = { } }, "window" : { cases: require("./window").tests, setUp : function() { - global.dom = require(__dirname + "/../lib/level1/core").dom.level1.core; - global.window = require(__dirname + "/../lib/browser").windowAugmentation(dom); + global.dom = require(__dirname + "/../lib/jsdom/level1/core").dom.level1.core; + global.window = require(__dirname + "/../lib/jsdom/browser").windowAugmentation(dom); global.builder.contentType = "text/html";