jQuery: The Write Less, Do More JavaScript Library

Changeset 5519

Show
Ignore:
Timestamp:
05/08/08 19:51:04 (3 months ago)
Author:
joern.zaefferer
Message:

ui and various plugins: moving to QUnit

Location:
trunk/plugins
Files:
1 removed
11 modified
4 moved

Legend:

Unmodified
Added
Removed
  • trunk/plugins/ajaxQueue/test/index.html

    r4187 r5519  
    55    <title>jQuery ajaxQueue Test Suite</title> 
    66     
    7     <link rel="stylesheet" href="testsuite.css"/> 
     7    <link rel="Stylesheet" media="screen" href="../../../qunit/testsuite.css" /> 
    88    <script type="text/javascript" src="jquery.js"></script> 
    99    <script type="text/javascript" src="../jquery.ajaxQueue.js"></script> 
    10     <script type="text/javascript" src="testrunner.js"></script> 
     10    <script type="text/javascript" src="../../../qunit/testrunner.js"></script> 
    1111    <script type="text/javascript" src="test.js"></script> 
    1212    <style type="text/css"> 
  • trunk/plugins/array/arrayTest.html

    r3266 r5519  
    22<head> 
    33    <title>Array Plugins Test Suite</title> 
    4     <link rel="stylesheet" href="../../jquery/test/data/testsuite.css" /> 
     4    <link rel="Stylesheet" media="screen" href="../../../qunit/testsuite.css" /> 
    55    <script type="text/javascript" src="../../jquery/dist/jquery.js"></script> 
    6     <script type="text/javascript" src="../../jquery/test/data/testrunner.js"></script> 
     6    <script type="text/javascript" src="../../../qunit/testrunner.js"></script> 
    77    <script type="text/javascript" src="jquery.array.js"></script> 
    88    <script type="text/javascript"> 
  • trunk/plugins/autocomplete/test/index.html

    r3911 r5519  
    22<html> 
    33<head> 
    4 <link rel="stylesheet" href="testsuite.css" /> 
     4<link rel="Stylesheet" media="screen" href="../../../qunit/testsuite.css" /> 
    55<script type="text/javascript" src="../lib/jquery.js"></script> 
    6 <script type="text/javascript" src="testrunner.js"></script> 
     6    <script type="text/javascript" src="../../../qunit/testrunner.js"></script> 
    77<!-- include metadata plugin two times to make sure that doesn't hurt anyone --> 
    88<script type="text/javascript" src="../jquery.autocomplete.js"></script> 
  • trunk/plugins/batch/test/index.html

    r4158 r5519  
    44    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
    55    <title>jQuery.batch Test Suite</title> 
    6     <link rel="Stylesheet" media="screen" href="data/testsuite.css" /> 
     6    <link rel="Stylesheet" media="screen" href="../../../qunit/testsuite.css" /> 
    77    <script type="text/javascript" src="data/jquery.js"></script> 
    88    <script type="text/javascript" src="../jquery.batch.js"></script> 
    9     <script type="text/javascript" src="data/testrunner.js"></script> 
     9    <script type="text/javascript" src="../../../qunit/testrunner.js"></script> 
    1010    <script type="text/javascript" src="unit/batch.js"></script> 
    1111</head> 
  • trunk/plugins/bgiframe/test/index.html

    r1546 r5519  
    1515        <script type="text/javascript" src="http://brandon.jquery.com/firebuglite/firebug.js"></script>--> 
    1616         
    17         <link rel="Stylesheet" media="screen" href="../../../jquery/test/data/testsuite.css" /> 
     17        <link rel="Stylesheet" media="screen" href="../../../qunit/testsuite.css" /> 
    1818         
    1919        <script type="text/javascript" charset="utf-8"> 
  • trunk/plugins/copyEvents/test/index.html

    r4270 r5519  
    66        <title>jQuery copyEvents.js Unit Test</title> 
    77         
    8         <link rel="Stylesheet" media="screen" href="testsuite.css" /> 
     8        <link rel="Stylesheet" media="screen" href="../../../qunit/testsuite.css" /> 
    99         
    1010        <script type="text/javascript" src="jquery.js"></script> 
    11         <script type="text/javascript" src="testrunner.js"></script> 
     11        <script type="text/javascript" src="../../../qunit/testrunner.js"></script> 
    1212        <script type="text/javascript" src="../jquery.copyEvents.js"></script> 
    1313        <script type="text/javascript" charset="utf-8"> 
  • trunk/plugins/form/test/index.html

    r4650 r5519  
    99 
    1010<!-- load testrunner from jquery project --> 
    11 <script type="text/javascript" src="../../../jquery/test/data/testrunner.js"></script> 
     11    <script type="text/javascript" src="../../../qunit/testrunner.js"></script> 
    1212 
    1313<!-- load form.js (this is what we're testing! --> 
    1414<script type="text/javascript" src="../jquery.form.js"></script> 
    15  
    16 <link rel="Stylesheet" media="screen" href="../../../jquery/test/data/testsuite.css" /> 
     15<link rel="Stylesheet" media="screen" href="../../../qunit/testsuite.css" /> 
    1716 
    1817<script> 
     
    814813</head> 
    815814<body id="body"> 
    816     <h1 id="banner">jQuery form.js - Test Suite</h1> 
     815    <h1 id="header">jQuery form.js - Test Suite</h1> 
     816    <h2 id="banner"></h2> 
    817817    <h2 id="userAgent"></h2> 
    818818 
  • trunk/plugins/fxqueue/test/index.html

    r1972 r5519  
    1010        <!-- load jquery.fxqueue.js (this is what we're testing! --> 
    1111        <script type="text/javascript" src="../jquery.fxqueue.js"></script> 
    12          
    13         <link rel="Stylesheet" media="screen" href="../../../jquery/test/data/testsuite.css" /> 
     12        <link rel="Stylesheet" media="screen" href="../../../qunit/testsuite.css" /> 
    1413         
    1514        <script type="text/javascript" charset="utf-8"> 
  • trunk/plugins/gradient/test/index.html

    r2163 r5519  
    1515        <script type="text/javascript" src="../jquery.gradient.js"></script> 
    1616         
    17         <link rel="Stylesheet" media="screen" href="../../../jquery/test/data/testsuite.css" /> 
     17        <link rel="Stylesheet" media="screen" href="../../../qunit/testsuite.css" /> 
    1818         
    1919        <script type="text/javascript" charset="utf-8"> 
  • trunk/plugins/metadata/test/index.html

    r3640 r5519  
    1313<body> 
    1414<h1>jQuery - Metadata Test Suite</h1> 
     15<h2 id="banner"></h2> 
     16<h2 id="userAgent"></h2> 
     17 
    1518<div id="main" style="display: none"> 
    1619    <ol id="one"> 
  • trunk/plugins/methods/methodsTest.html

    r935 r5519  
    22<html> 
    33<head> 
    4 <link rel="stylesheet" href="../../jquery/build/test/data/testsuite.css" /> 
     4<link rel="Stylesheet" media="screen" href="../../../qunit/testsuite.css" /> 
    55<script type="text/javascript" src="../../jquery/dist/jquery.js"></script> 
    6 <script type="text/javascript" src="../../jquery/build/test/data/testrunner.js"></script> 
    7 <script type="text/javascript" src="jquery.string.js"></script> 
    8 <script type="text/javascript" src="jquery.array.js"></script> 
    9 <script type="text/javascript" src="jquery.date.js"></script> 
     6<script type="text/javascript" src="../../../qunit/testrunner.js"></script> 
     7<script type="text/javascript" src="string.js"></script> 
     8<script type="text/javascript" src="array.js"></script> 
     9<script type="text/javascript" src="date.js"></script> 
    1010<script type="text/javascript"> 
    1111test("String.trim()", function() { 
  • trunk/plugins/mousewheel/test/index.html

    r4260 r5519  
    44    <head> 
    55        <title>Testing mousewheel plugin</title> 
    6         <link rel="Stylesheet" media="screen" href="testsuite.css" /> 
     6        <link rel="Stylesheet" media="screen" href="../../../qunit/testsuite.css" /> 
    77        <script type="text/javascript" src="jquery.js"></script> 
    88        <script type="text/javascript" src="../jquery.mousewheel.js"></script> 
  • trunk/plugins/templating/tests/index.html

    r2775 r5519  
    44  <head> 
    55    <title>Templating</title> 
    6     <link rel="stylesheet" href="testsuite.css" /> 
     6    <link rel="Stylesheet" media="screen" href="../../../qunit/testsuite.css" /> 
    77    <script type="text/javascript" src="jquery.min.js"></script> 
    88    <script type="text/javascript" src="../jquery.templating.js"></script> 
    9     <script type="text/javascript" src="testrunner.js"></script> 
     9    <script type="text/javascript" src="../../../qunit/testrunner.js"></script> 
    1010  </head> 
    1111  <body id="body"> 
  • trunk/plugins/validate/test/index.html

    r5251 r5519  
    22<head> 
    33    <title>jQuery - Validation Test Suite</title> 
    4     <link rel="stylesheet" href="testsuite.css"/> 
     4    <link rel="Stylesheet" media="screen" href="../../../qunit/testsuite.css" /> 
    55    <script type="text/javascript" src="../lib/jquery.js"></script> 
    66    <script type="text/javascript" src="../lib/jquery.form.js"></script> 
    7     <script type="text/javascript" src="testrunner.js"></script> 
     7    <script type="text/javascript" src="../../../qunit/testrunner.js"></script> 
    88    <script type="text/javascript" src="../lib/jquery.metadata.js"></script> 
    99    <script type="text/javascript" src="../jquery.validate.js"></script> 
  • trunk/plugins/validate/test/testrunner.js

    r5215 r5519  
    224224} 
    225225 
    226 function flatMap(a, block) { 
    227     var result = []; 
    228     $.each(a, function() { 
    229         var x = block.apply(this, arguments); 
    230         if (x !== false) 
    231             result.push(x); 
    232     }) 
    233     return result; 
    234 } 
    235  
    236 function serialObject( a ) { 
    237     return "{ " + flatMap(a, function(key, value) { 
    238         return key + ": " + value; 
    239     }).join(", ") + " }"; 
    240 } 
    241  
    242 function compare(a, b, msg) { 
    243     var ret = true; 
    244     if ( a && b && a.length != undefined && a.length == b.length ) { 
    245         for ( var i = 0; i < a.length; i++ ) 
    246             for(var key in a[i]) { 
    247                 if (a[i][key].constructor == Array) { 
    248                     for (var arrayKey in a[i][key]) { 
    249                         if (a[i][key][arrayKey] != b[i][key][arrayKey]) { 
    250                             ret = false; 
    251                         } 
    252                     } 
    253                 } else if (a[i][key] != b[i][key]) { 
    254                     ret = false 
    255                 } 
    256             } 
    257     } else 
    258         ret = false; 
    259     ok( ret, msg + " expected: " + serialArray(b) + " result: " + serialArray(a) ); 
    260 } 
    261  
    262 function compare2(a, b, msg) { 
    263     var ret = true; 
    264     if ( a && b ) { 
    265         for(var key in a) { 
    266             if (a[key].constructor == Array) { 
    267                 for (var arrayKey in a[key]) { 
    268                     if (a[key][arrayKey] != b[key][arrayKey]) { 
    269                         ret = false; 
    270                     } 
    271                 } 
    272             } else if (a[key] != b[key]) { 
    273                 ret = false 
    274             } 
    275         } 
    276         for(key in b) { 
    277             if (b[key].constructor == Array) { 
    278                 for (var arrayKey in b[key]) { 
    279                     if (a[key][arrayKey] != b[key][arrayKey]) { 
    280                         ret = false; 
    281                     } 
    282                 } 
    283             } else if (a[key] != b[key]) { 
    284                 ret = false 
    285             } 
    286         } 
    287     } else 
    288         ret = false; 
    289     ok( ret, msg + " expected: " + serialObject(b) + " result: " + serialObject(a) ); 
    290 } 
    291  
    292226/** 
    293227 * Returns an array of elements with the given IDs, eg.