diff options
author | Brandon Aaron <brandon.aaron@gmail.com> | 2010-03-23 22:40:38 -0500 |
---|---|---|
committer | Brandon Aaron <brandon.aaron@gmail.com> | 2010-03-23 22:40:38 -0500 |
commit | efea0f23f9e0f147c5ff5b5d35249417c32c3a53 (patch) | |
tree | d04af52829f25ce329c75fc130b767237455898f /test | |
parent | 656fe92178fda539d91fe31965b28bccff484778 (diff) | |
parent | 96ea3d615ef1511bc9ebe45cd34dda2d5af87559 (diff) | |
download | jquery-efea0f23f9e0f147c5ff5b5d35249417c32c3a53.tar.gz jquery-efea0f23f9e0f147c5ff5b5d35249417c32c3a53.zip |
Merge branch 'master' of github.com:jquery/jquery
Diffstat (limited to 'test')
-rw-r--r-- | test/data/offset/absolute.html | 11 | ||||
-rw-r--r-- | test/data/offset/body.html | 10 | ||||
-rw-r--r-- | test/data/offset/fixed.html | 10 | ||||
-rw-r--r-- | test/data/offset/relative.html | 10 | ||||
-rw-r--r-- | test/data/offset/scroll.html | 10 | ||||
-rw-r--r-- | test/data/offset/static.html | 10 | ||||
-rw-r--r-- | test/data/offset/table.html | 10 | ||||
-rw-r--r-- | test/data/testrunner.js | 10 | ||||
-rw-r--r-- | test/index.html | 51 | ||||
-rw-r--r-- | test/unit/ajax.js | 10 | ||||
-rw-r--r-- | test/unit/attributes.js | 12 | ||||
-rw-r--r-- | test/unit/dimensions.js | 2 |
12 files changed, 122 insertions, 34 deletions
diff --git a/test/data/offset/absolute.html b/test/data/offset/absolute.html index 2a7eb73e5..dc0ba22f2 100644 --- a/test/data/offset/absolute.html +++ b/test/data/offset/absolute.html @@ -15,6 +15,15 @@ p.instructions { position: absolute; bottom: 0; } #positionTest { position: absolute; } </style> + <script src="../../../src/core.js"></script> + <script src="../../../src/support.js"></script> + <script src="../../../src/sizzle/sizzle.js"></script> + <script src="../../../src/sizzle-jquery.js"></script> + <script src="../../../src/traversing.js"></script> + <script src="../../../src/data.js"></script> + <script src="../../../src/event.js"></script> + <script src="../../../src/css.js"></script> + <script src="../../../src/offset.js"></script> <script type="text/javascript" src="../../../dist/jquery.js"></script> <script type="text/javascript" charset="utf-8"> $(function() { @@ -38,4 +47,4 @@ <div id="marker"></div> <p class="instructions">Click the white box to move the marker to it. Clicking the box also changes the position to absolute (if not already) and sets the position according to the position method.</p> </body> -</html>
\ No newline at end of file +</html> diff --git a/test/data/offset/body.html b/test/data/offset/body.html index 1f13dd5bc..9a692e800 100644 --- a/test/data/offset/body.html +++ b/test/data/offset/body.html @@ -8,7 +8,15 @@ body { margin: 1px; padding: 5px; } #marker { position: absolute; border: 2px solid #000; width: 50px; height: 50px; background: #ccc; } </style> - <script type="text/javascript" src="../../../dist/jquery.js"></script> + <script src="../../../src/core.js"></script> + <script src="../../../src/support.js"></script> + <script src="../../../src/sizzle/sizzle.js"></script> + <script src="../../../src/sizzle-jquery.js"></script> + <script src="../../../src/traversing.js"></script> + <script src="../../../src/data.js"></script> + <script src="../../../src/event.js"></script> + <script src="../../../src/css.js"></script> + <script src="../../../src/offset.js"></script> <script type="text/javascript" charset="utf-8"> $(function() { $('body').click(function() { diff --git a/test/data/offset/fixed.html b/test/data/offset/fixed.html index 8d69aae94..f795e5c99 100644 --- a/test/data/offset/fixed.html +++ b/test/data/offset/fixed.html @@ -12,7 +12,15 @@ #forceScroll { width: 5000px; height: 5000px; } #marker { position: absolute; border: 2px solid #000; width: 50px; height: 50px; background: #ccc; } </style> - <script type="text/javascript" src="../../../dist/jquery.js"></script> + <script src="../../../src/core.js"></script> + <script src="../../../src/support.js"></script> + <script src="../../../src/sizzle/sizzle.js"></script> + <script src="../../../src/sizzle-jquery.js"></script> + <script src="../../../src/traversing.js"></script> + <script src="../../../src/data.js"></script> + <script src="../../../src/event.js"></script> + <script src="../../../src/css.js"></script> + <script src="../../../src/offset.js"></script> <script type="text/javascript" charset="utf-8"> $(function() { window.scrollTo(1000,1000); diff --git a/test/data/offset/relative.html b/test/data/offset/relative.html index 55f0da83f..bfcd147c3 100644 --- a/test/data/offset/relative.html +++ b/test/data/offset/relative.html @@ -10,7 +10,15 @@ #relative-2 { top: 20px; left: 20px; } #marker { position: absolute; border: 2px solid #000; width: 50px; height: 50px; background: #ccc; } </style> - <script type="text/javascript" src="../../../dist/jquery.js"></script> + <script src="../../../src/core.js"></script> + <script src="../../../src/support.js"></script> + <script src="../../../src/sizzle/sizzle.js"></script> + <script src="../../../src/sizzle-jquery.js"></script> + <script src="../../../src/traversing.js"></script> + <script src="../../../src/data.js"></script> + <script src="../../../src/event.js"></script> + <script src="../../../src/css.js"></script> + <script src="../../../src/offset.js"></script> <script type="text/javascript" charset="utf-8"> $(function() { $('.relative').click(function() { diff --git a/test/data/offset/scroll.html b/test/data/offset/scroll.html index 494f64058..e6980b441 100644 --- a/test/data/offset/scroll.html +++ b/test/data/offset/scroll.html @@ -13,7 +13,15 @@ #forceScroll { width: 5000px; height: 5000px; } #marker { position: absolute; border: 2px solid #000; width: 50px; height: 50px; background: #ccc; } </style> - <script type="text/javascript" src="../../../dist/jquery.js"></script> + <script src="../../../src/core.js"></script> + <script src="../../../src/support.js"></script> + <script src="../../../src/sizzle/sizzle.js"></script> + <script src="../../../src/sizzle-jquery.js"></script> + <script src="../../../src/traversing.js"></script> + <script src="../../../src/data.js"></script> + <script src="../../../src/event.js"></script> + <script src="../../../src/css.js"></script> + <script src="../../../src/offset.js"></script> <script type="text/javascript" charset="utf-8"> $(function() { window.scrollTo(1000,1000); diff --git a/test/data/offset/static.html b/test/data/offset/static.html index 6a499298d..f47a79b39 100644 --- a/test/data/offset/static.html +++ b/test/data/offset/static.html @@ -10,7 +10,15 @@ #static-2 { top: 20px; left: 20px; } #marker { position: absolute; border: 2px solid #000; width: 50px; height: 50px; background: #ccc; } </style> - <script type="text/javascript" src="../../../dist/jquery.js"></script> + <script src="../../../src/core.js"></script> + <script src="../../../src/support.js"></script> + <script src="../../../src/sizzle/sizzle.js"></script> + <script src="../../../src/sizzle-jquery.js"></script> + <script src="../../../src/traversing.js"></script> + <script src="../../../src/data.js"></script> + <script src="../../../src/event.js"></script> + <script src="../../../src/css.js"></script> + <script src="../../../src/offset.js"></script> <script type="text/javascript" charset="utf-8"> $(function() { $('.static').click(function() { diff --git a/test/data/offset/table.html b/test/data/offset/table.html index 5d15b903b..83fb559f3 100644 --- a/test/data/offset/table.html +++ b/test/data/offset/table.html @@ -10,7 +10,15 @@ th, td { border: 1px solid #000; width: 100px; height: 100px; } #marker { position: absolute; border: 2px solid #000; width: 50px; height: 50px; background: #ccc; } </style> - <script type="text/javascript" src="../../../dist/jquery.js"></script> + <script src="../../../src/core.js"></script> + <script src="../../../src/support.js"></script> + <script src="../../../src/sizzle/sizzle.js"></script> + <script src="../../../src/sizzle-jquery.js"></script> + <script src="../../../src/traversing.js"></script> + <script src="../../../src/data.js"></script> + <script src="../../../src/event.js"></script> + <script src="../../../src/css.js"></script> + <script src="../../../src/offset.js"></script> <script type="text/javascript" charset="utf-8"> $(function() { $('table, th, td').click(function() { diff --git a/test/data/testrunner.js b/test/data/testrunner.js index 95a1b6eec..a0eb3621a 100644 --- a/test/data/testrunner.js +++ b/test/data/testrunner.js @@ -1 +1,11 @@ jQuery.noConflict(); // Allow the test to run with other libs or jQuery's. + +// load testswarm agent +(function() { + var url = window.location.search; + url = decodeURIComponent( url.slice( url.indexOf("swarmURL=") + 9 ) ); + if ( !url || url.indexOf("http") !== 0 ) { + return; + } + document.write("<scr" + "ipt src='http://swarm.jquery.org/js/inject.js?" + (new Date).getTime() + "'></scr" + "ipt>"); +})(); diff --git a/test/index.html b/test/index.html index d6d02f47f..be1f3632a 100644 --- a/test/index.html +++ b/test/index.html @@ -6,23 +6,40 @@ <link rel="Stylesheet" media="screen" href="qunit/qunit/qunit.css" /> <link rel="Stylesheet" media="screen" href="data/testsuite.css" /> <!-- Includes --> - <script type="text/javascript" src="data/testinit.js"></script> - <script type="text/javascript" src="../dist/jquery.js"></script> - <script type="text/javascript" src="qunit/qunit/qunit.js"></script> - <script type="text/javascript" src="data/testrunner.js"></script> - <script type="text/javascript" src="unit/core.js"></script> - <script type="text/javascript" src="unit/data.js"></script> - <script type="text/javascript" src="unit/queue.js"></script> - <script type="text/javascript" src="unit/attributes.js"></script> - <script type="text/javascript" src="unit/css.js"></script> - <script type="text/javascript" src="unit/traversing.js"></script> - <script type="text/javascript" src="unit/manipulation.js"></script> - <script type="text/javascript" src="unit/dimensions.js"></script> - <script type="text/javascript" src="unit/selector.js"></script> - <script type="text/javascript" src="unit/event.js"></script> - <script type="text/javascript" src="unit/ajax.js"></script> - <script type="text/javascript" src="unit/effects.js"></script> - <script type="text/javascript" src="unit/offset.js"></script> + <script src="data/testinit.js"></script> + + <script src="../src/core.js"></script> + <script src="../src/support.js"></script> + <script src="../src/data.js"></script> + <script src="../src/queue.js"></script> + <script src="../src/attributes.js"></script> + <script src="../src/event.js"></script> + <script src="../src/sizzle/sizzle.js"></script> + <script src="../src/sizzle-jquery.js"></script> + <script src="../src/traversing.js"></script> + <script src="../src/manipulation.js"></script> + <script src="../src/css.js"></script> + <script src="../src/ajax.js"></script> + <script src="../src/effects.js"></script> + <script src="../src/offset.js"></script> + <script src="../src/dimensions.js"></script> + + <script src="qunit/qunit/qunit.js"></script> + <script src="data/testrunner.js"></script> + + <script src="unit/core.js"></script> + <script src="unit/data.js"></script> + <script src="unit/queue.js"></script> + <script src="unit/attributes.js"></script> + <script src="unit/event.js"></script> + <script src="unit/selector.js"></script> + <script src="unit/traversing.js"></script> + <script src="unit/manipulation.js"></script> + <script src="unit/css.js"></script> + <script src="unit/ajax.js"></script> + <script src="unit/effects.js"></script> + <script src="unit/offset.js"></script> + <script src="unit/dimensions.js"></script> </head> <body id="body"> diff --git a/test/unit/ajax.js b/test/unit/ajax.js index ce257f88a..be4b3f021 100644 --- a/test/unit/ajax.js +++ b/test/unit/ajax.js @@ -774,7 +774,7 @@ test("jQuery.ajax() - JSONP, Remote", function() { var count = 0; function plus(){ if ( ++count == 4 ) start(); } - var base = window.location.href.replace(/\?.*$/, ""); + var base = window.location.href.replace(/[^\/]*$/, ""); stop(); @@ -836,7 +836,7 @@ test("jQuery.ajax() - JSONP, Remote", function() { test("jQuery.ajax() - script, Remote", function() { expect(2); - var base = window.location.href.replace(/\?.*$/, ""); + var base = window.location.href.replace(/[^\/]*$/, ""); stop(); @@ -853,7 +853,7 @@ test("jQuery.ajax() - script, Remote", function() { test("jQuery.ajax() - script, Remote with POST", function() { expect(3); - var base = window.location.href.replace(/\?.*$/, ""); + var base = window.location.href.replace(/[^\/]*$/, ""); stop(); @@ -876,7 +876,7 @@ test("jQuery.ajax() - script, Remote with POST", function() { test("jQuery.ajax() - script, Remote with scheme-less URL", function() { expect(2); - var base = window.location.href.replace(/\?.*$/, ""); + var base = window.location.href.replace(/[^\/]*$/, ""); base = base.replace(/^.*?\/\//, "//"); stop(); @@ -991,7 +991,7 @@ test("jQuery.getJSON - Using Native JSON", function() { test("jQuery.getJSON(String, Function) - JSON object with absolute url to local content", function() { expect(2); - var base = window.location.href.replace(/\?.*$/, ""); + var base = window.location.href.replace(/[^\/]*$/, ""); stop(); jQuery.getJSON(url(base + "data/json.php"), function(json) { diff --git a/test/unit/attributes.js b/test/unit/attributes.js index d7abbad35..21d3d94bc 100644 --- a/test/unit/attributes.js +++ b/test/unit/attributes.js @@ -482,8 +482,10 @@ test("addClass(Function) with incoming value", function() { }); div.addClass(function(i, val) { - equals( val, old[i], "Make sure the incoming value is correct." ); - return "test"; + if ( this.id !== "_firebugConsole" ) { + equals( val, old[i], "Make sure the incoming value is correct." ); + return "test"; + } }); var pass = true; @@ -553,8 +555,10 @@ test("removeClass(Function) with incoming value", function() { }); $divs.removeClass(function(i, val) { - equals( val, old[i], "Make sure the incoming value is correct." ); - return "test"; + if ( this.id !== "_firebugConsole" ) { + equals( val, old[i], "Make sure the incoming value is correct." ); + return "test"; + } }); ok( !$divs.is('.test'), "Remove Class" ); diff --git a/test/unit/dimensions.js b/test/unit/dimensions.js index 74405cee7..539779077 100644 --- a/test/unit/dimensions.js +++ b/test/unit/dimensions.js @@ -26,7 +26,7 @@ function testWidth( val ) { $div.css({ display: "", border: "", padding: "" }); - jQuery("#nothiddendivchild").css({ padding: "3px", border: "2px solid #fff" }); + jQuery("#nothiddendivchild").css({ width: 20, padding: "3px", border: "2px solid #fff" }); equals(jQuery("#nothiddendivchild").width(), 20, "Test child width with border and padding"); jQuery("#nothiddendiv, #nothiddendivchild").css({ border: "", padding: "", width: "" }); |