]> source.dussan.org Git - jquery.git/commitdiff
Add necessary test html from Sizzle tests; Add an easy way to turn off QSA in tests
authortimmywil <timmywillisn@gmail.com>
Fri, 15 Jun 2012 06:09:38 +0000 (02:09 -0400)
committertimmywil <timmywillisn@gmail.com>
Fri, 15 Jun 2012 06:09:38 +0000 (02:09 -0400)
src/sizzle
test/index.html

index c24253c0556a75bfb145dccee6f074d064b3fdc3..7340e00eed33d86ad92aaa355c1efda4222bbd88 160000 (submodule)
@@ -1 +1 @@
-Subproject commit c24253c0556a75bfb145dccee6f074d064b3fdc3
+Subproject commit 7340e00eed33d86ad92aaa355c1efda4222bbd88
index 3de1565fe7cc48600d28da4b3ac6c848c6b59ec0..07c06813f8a406c640f3a7162fe567c7d1240b50 100644 (file)
@@ -9,25 +9,32 @@
 
        <script src="data/testinit.js"></script>
 
+       <!-- Loads minified version if version=min is present in the search -->
+       <!-- Nullifies querySelectorAll if qsa=no is present -->
        <script>
-               var set, keyvals, params,
+               (function() {
+                       var set, keyvals, params,
                                version = "";
 
-               if ( location.search ) {
-                       keyvals = location.search.slice(1).split("&"),
-                       params = {};
-
-                       while ( keyvals.length ) {
-                               set = keyvals.shift().split("=");
-                               params[ set[0] ] = set[1];
-                       }
-                       if ( params.version && params.version === "min" ) {
-                               version = params.version + ".";
+                       if ( location.search ) {
+                               keyvals = location.search.slice(1).split("&"),
+                               params = {};
+
+                               while ( keyvals.length ) {
+                                       set = keyvals.shift().split("=");
+                                       params[ set[0] ] = set[1];
+                               }
+                               if ( params.version && params.version === "min" ) {
+                                       version = params.version + ".";
+                               }
+                               if ( params.qsa && params.qsa === "no" ) {
+                                       document.querySelectorAll = null;
+                               }
                        }
-               }
-               document.write(
-                       "<script src='../dist/jquery." + version + "js'><\/script>"
-               );
+                       document.write(
+                               "<script src='../dist/jquery." + version + "js'><\/script>"
+                       );
+               })();
        </script>
 
        <script src="qunit/qunit/qunit.js"></script>
@@ -64,7 +71,8 @@
 
 <body id="body">
        <h1 id="qunit-header"><a href="/jquery/test/index.html">jQuery Test Suite</a>
-               <a href="?jquery=min">(minified)</a>
+               <a href="?version=min">(minified)</a>
+               <a href="?qsa=no">(-querySelectorAll)</a>
        </h1>
        <h2 id="qunit-banner"></h2>
        <div id="qunit-testrunner-toolbar"></div>
@@ -269,6 +277,14 @@ Z</textarea>
                <div id="siblingTest">
                        <em id="siblingfirst">1</em>
                        <em id="siblingnext">2</em>
+                       <em id="siblingthird">
+                               <em id="siblingchild">
+                                       <em id="siblinggrandchild">
+                                               <em id="siblinggreatgrandchild"></em>
+                                       </em>
+                               </em>
+                       </em>
+                       <span id="siblingspan"></span>
                </div>
        </div>
        </dl>