diff options
author | Richard Worth <rdworth@gmail.com> | 2008-11-22 19:29:03 +0000 |
---|---|---|
committer | Richard Worth <rdworth@gmail.com> | 2008-11-22 19:29:03 +0000 |
commit | 0472ff10bbd12648b57905d0833fb6e572853dd5 (patch) | |
tree | 5f348736928a7347dbe8c14ddc26e2795b04ae9d /tests | |
parent | f389497e48c1f8d4024f479364a8b5cba8f8a88d (diff) | |
download | jquery-ui-0472ff10bbd12648b57905d0833fb6e572853dd5.tar.gz jquery-ui-0472ff10bbd12648b57905d0833fb6e572853dd5.zip |
tests: formatting and cleanup for consistency
Diffstat (limited to 'tests')
-rw-r--r-- | tests/accordion.html | 21 | ||||
-rw-r--r-- | tests/core.html | 18 | ||||
-rw-r--r-- | tests/datepicker.html | 17 | ||||
-rw-r--r-- | tests/dialog.html | 19 | ||||
-rw-r--r-- | tests/draggable.html | 21 | ||||
-rw-r--r-- | tests/droppable.html | 20 | ||||
-rw-r--r-- | tests/progressbar.html | 21 | ||||
-rw-r--r-- | tests/resizable.html | 21 | ||||
-rw-r--r-- | tests/selectable.html | 19 | ||||
-rw-r--r-- | tests/slider.html | 21 | ||||
-rw-r--r-- | tests/sortable.html | 21 | ||||
-rw-r--r-- | tests/tabs.html | 22 | ||||
-rw-r--r-- | tests/testsuite.css | 4 | ||||
-rw-r--r-- | tests/testsuite.js | 10 | ||||
-rw-r--r-- | tests/ui.html | 15 |
15 files changed, 60 insertions, 210 deletions
diff --git a/tests/accordion.html b/tests/accordion.html index 569a5d6d3..13079e1f2 100644 --- a/tests/accordion.html +++ b/tests/accordion.html @@ -3,35 +3,20 @@ <head> <title>jQuery UI Accordion Test Suite</title> - <link rel="stylesheet" href="qunit/testsuite.css" type="text/css" media="screen"> - <script type="text/javascript" src="../jquery-1.2.6.js"></script> <script type="text/javascript" src="../ui/ui.core.js"></script> <script type="text/javascript" src="../ui/ui.accordion.js"></script> + <link type="text/css" href="testsuite.css" rel="stylesheet" /> + <script type="text/javascript" src="testsuite.js"></script> <script type="text/javascript" src="qunit/testrunner.js"></script> <script type="text/javascript" src="simulate/jquery.simulate.js"></script> <script type="text/javascript" src="accordion.js"></script> - - <style type="text/css"> - .xerror, .error { display: none } - </style> - - - - - </head> <body> -<h1 id="header">jQuery UI Accordion Test Suite</h1> -<h2 id="banner"></h2> -<h2 id="userAgent"></h2> - -<ol id="tests"></ol> - -<div id="main" style="position:absolute;top:-2000000px;"> +<div id="main"> <div id="list1"> <a>There is one obvious advantage:</a> diff --git a/tests/core.html b/tests/core.html index b7fc9c569..0ed3a7c9c 100644 --- a/tests/core.html +++ b/tests/core.html @@ -3,27 +3,19 @@ <head> <title>jQuery UI Core Test Suite</title> - <link rel="stylesheet" href="qunit/testsuite.css" type="text/css" media="screen"> - <script type="text/javascript" src="../jquery-1.2.6.js"></script> <script type="text/javascript" src="../ui/ui.core.js"></script> + <link type="text/css" href="testsuite.css" rel="stylesheet" /> + <script type="text/javascript" src="testsuite.js"></script> <script type="text/javascript" src="qunit/testrunner.js"></script> - <script type="text/javascript" src="core.js"></script> + <script type="text/javascript" src="simulate/jquery.simulate.js"></script> - <style type="text/css"> - html { border: 0; } - </style> + <script type="text/javascript" src="core.js"></script> </head> <body> -<h1 id="header">jQuery UI Core Test Suite</h1> -<h2 id="banner"></h2> -<h2 id="userAgent"></h2> - -<ol id="tests"></ol> - -<div id="main" style="position: absolute; top: -10000px; border: 1px solid black; padding: 10px; margin: 10px;"> +<div id="main"> <div id="wrap1"> <input id="input1-1" /> <input type="text" id="input1-2" /> diff --git a/tests/datepicker.html b/tests/datepicker.html index d6c1a1424..9cd6a3422 100644 --- a/tests/datepicker.html +++ b/tests/datepicker.html @@ -3,33 +3,26 @@ <head> <title>jQuery UI Datepicker Test Suite</title> - <link rel="stylesheet" href="qunit/testsuite.css" type="text/css" media="screen"> - <script type="text/javascript" src="../jquery-1.2.6.js"></script> <script type="text/javascript" src="../ui/ui.core.js"></script> <script type="text/javascript" src="../ui/ui.datepicker.js"></script> <script type="text/javascript" src="../ui/i18n/ui.datepicker-fr.js"></script> <script type="text/javascript" src="../ui/i18n/ui.datepicker-he.js"></script> + <link type="text/css" href="testsuite.css" rel="stylesheet" /> + <script type="text/javascript" src="testsuite.js"></script> <script type="text/javascript" src="qunit/testrunner.js"></script> <script type="text/javascript" src="simulate/jquery.simulate.js"></script> - <script type="text/javascript" src="datepicker.js"></script> - <style type="text/css"> @import "../themes/default/ui.datepicker.css"; - .xerror, .error { display: none } </style> + + <script type="text/javascript" src="datepicker.js"></script> </head> <body> -<h1 id="header">jQuery UI Datepicker Test Suite</h1> -<h2 id="banner"></h2> -<h2 id="userAgent"></h2> - -<ol id="tests"></ol> - -<div id="main" style="position:absolute;top:-2000000px;"> +<div id="main"> <p><input type="text" id="inp"/><input type="text" id="alt"/><div id="inl"></div></p> </div> diff --git a/tests/dialog.html b/tests/dialog.html index 200ed7660..8883350e9 100644 --- a/tests/dialog.html +++ b/tests/dialog.html @@ -3,35 +3,22 @@ <head> <title>jQuery UI Dialog Test Suite</title> - <link rel="stylesheet" href="qunit/testsuite.css" type="text/css" media="screen"> - <script type="text/javascript" src="../jquery-1.2.6.js"></script> <script type="text/javascript" src="../ui/ui.core.js"></script> <script type="text/javascript" src="../ui/ui.dialog.js"></script> <script type="text/javascript" src="../ui/ui.draggable.js"></script> <script type="text/javascript" src="../ui/ui.resizable.js"></script> + <link type="text/css" href="testsuite.css" rel="stylesheet" /> + <script type="text/javascript" src="testsuite.js"></script> <script type="text/javascript" src="qunit/testrunner.js"></script> <script type="text/javascript" src="simulate/jquery.simulate.js"></script> <script type="text/javascript" src="dialog.js"></script> - - <style type="text/css"> - html { border: 0; } - </style> - - - </head> <body> -<h1 id="header">jQuery UI Dialog Test Suite</h1> -<h2 id="banner"></h2> -<h2 id="userAgent"></h2> - -<ol id="tests"></ol> - -<div id="main" style="position: absolute; top: -10000px; border: 1px solid black; padding: 10px; margin: 10px;"> +<div id="main"> <div id="dialog1">Dialog Content</div> </div> diff --git a/tests/draggable.html b/tests/draggable.html index 2c936f757..6329f9d54 100644 --- a/tests/draggable.html +++ b/tests/draggable.html @@ -3,35 +3,20 @@ <head> <title>jQuery UI Draggable Test Suite</title> - <link rel="stylesheet" href="qunit/testsuite.css" type="text/css" media="screen"> - <script type="text/javascript" src="../jquery-1.2.6.js"></script> <script type="text/javascript" src="../ui/ui.core.js"></script> <script type="text/javascript" src="../ui/ui.draggable.js"></script> + <link type="text/css" href="testsuite.css" rel="stylesheet" /> + <script type="text/javascript" src="testsuite.js"></script> <script type="text/javascript" src="qunit/testrunner.js"></script> <script type="text/javascript" src="simulate/jquery.simulate.js"></script> <script type="text/javascript" src="draggable.js"></script> - - <style type="text/css"> - html { border: 0; } - #main { - position:absolute !important; - top: -1000px !important; - left: -1000px !important; - } - </style> </head> <body> -<h1 id="header">jQuery UI Draggable Test Suite</h1> -<h2 id="banner"></h2> -<h2 id="userAgent"></h2> - -<ol id="tests"></ol> - -<div id="main" style="border: 1px solid black; padding: 10px; margin: 10px; height: 500px; overflow: auto;"> +<div id="main"> <div id="draggable1" style="background: green; width: 200px; height: 100px;">Relative</div> <div id="draggable2" style="background: green; width: 200px; height: 100px; position: absolute; top: 10px; left: 10px;"><span>Absolute</span></div> <div style='width: 1px; height: 1000px;'></div> diff --git a/tests/droppable.html b/tests/droppable.html index d2a4e0beb..a318b5ba2 100644 --- a/tests/droppable.html +++ b/tests/droppable.html @@ -3,35 +3,21 @@ <head> <title>jQuery UI Droppable Test Suite</title> - <link rel="stylesheet" href="qunit/testsuite.css" type="text/css" media="screen"> - <script type="text/javascript" src="../jquery-1.2.6.js"></script> <script type="text/javascript" src="../ui/ui.core.js"></script> <script type="text/javascript" src="../ui/ui.draggable.js"></script> <script type="text/javascript" src="../ui/ui.droppable.js"></script> + <link type="text/css" href="testsuite.css" rel="stylesheet" /> + <script type="text/javascript" src="testsuite.js"></script> <script type="text/javascript" src="qunit/testrunner.js"></script> <script type="text/javascript" src="simulate/jquery.simulate.js"></script> <script type="text/javascript" src="droppable.js"></script> - - <style type="text/css"> - html { border: 0; } - #main { - top: -1000px; - left: -1000px; - } - </style> </head> <body> -<h1 id="header">jQuery UI Droppable Test Suite</h1> -<h2 id="banner"></h2> -<h2 id="userAgent"></h2> - -<ol id="tests"></ol> - -<div id="main" style='position: absolute; width: 300px; height: 300px; overflow: auto;'> +<div id="main"> <div id="draggable1" style="width: 25px; height: 25px;">Draggable</div> <div id="droppable1" style="width: 100px; height: 100px;">Droppable</div> <div style='width:1000px;height:1000px;'> </div> diff --git a/tests/progressbar.html b/tests/progressbar.html index 854d0c8e5..e9210bf12 100644 --- a/tests/progressbar.html +++ b/tests/progressbar.html @@ -3,35 +3,20 @@ <head> <title>jQuery UI Progressbar Test Suite</title> - <link rel="stylesheet" href="qunit/testsuite.css" type="text/css" media="screen"> - <script type="text/javascript" src="../jquery-1.2.6.js"></script> <script type="text/javascript" src="../ui/ui.core.js"></script> <script type="text/javascript" src="../ui/ui.progressbar.js"></script> + <link type="text/css" href="testsuite.css" rel="stylesheet" /> + <script type="text/javascript" src="testsuite.js"></script> <script type="text/javascript" src="qunit/testrunner.js"></script> <script type="text/javascript" src="simulate/jquery.simulate.js"></script> <script type="text/javascript" src="progressbar.js"></script> - - <style type="text/css"> - - - - </style> - - - </head> <body> -<h1 id="header">jQuery UI Progressbar Test Suite</h1> -<h2 id="banner"></h2> -<h2 id="userAgent"></h2> - -<ol id="tests"></ol> - -<div id="main" style="position:absolute;top:-20000px"> +<div id="main"> <div id="progressbar"></div> </div> diff --git a/tests/resizable.html b/tests/resizable.html index 7e45de93d..87a4952bb 100644 --- a/tests/resizable.html +++ b/tests/resizable.html @@ -3,35 +3,20 @@ <head> <title>jQuery UI Resizable Test Suite</title> - <link rel="stylesheet" href="qunit/testsuite.css" type="text/css" media="screen"> - <script type="text/javascript" src="../jquery-1.2.6.js"></script> <script type="text/javascript" src="../ui/ui.core.js"></script> <script type="text/javascript" src="../ui/ui.resizable.js"></script> + <link type="text/css" href="testsuite.css" rel="stylesheet" /> + <script type="text/javascript" src="testsuite.js"></script> <script type="text/javascript" src="qunit/testrunner.js"></script> <script type="text/javascript" src="simulate/jquery.simulate.js"></script> <script type="text/javascript" src="resizable.js"></script> - - <style type="text/css"> - #main { - position: absolute !important; - top: -1000px !important; - left: -1000px !important; - } - </style> - </head> <body> -<h1 id="header">jQuery UI Resizable Test Suite</h1> -<h2 id="banner"></h2> -<h2 id="userAgent"></h2> - -<ol id="tests"></ol> - -<div id="main" style="border: 1px solid black; padding: 10px; margin: 10px;"> +<div id="main"> <div id="resizable1" style="background: green; width: 100px; height: 100px;">I'm a resizable.</div> <img src="images/test.jpg" id="resizable2" style="width: 100px; height: 100px;"/> </div> diff --git a/tests/selectable.html b/tests/selectable.html index 834a48e4e..80084767e 100644 --- a/tests/selectable.html +++ b/tests/selectable.html @@ -3,33 +3,20 @@ <head> <title>jQuery UI Selectable Test Suite</title> - <link rel="stylesheet" href="qunit/testsuite.css" type="text/css" media="screen"> - <script type="text/javascript" src="../jquery-1.2.6.js"></script> <script type="text/javascript" src="../ui/ui.core.js"></script> <script type="text/javascript" src="../ui/ui.selectable.js"></script> + <link type="text/css" href="testsuite.css" rel="stylesheet" /> + <script type="text/javascript" src="testsuite.js"></script> <script type="text/javascript" src="qunit/testrunner.js"></script> <script type="text/javascript" src="simulate/jquery.simulate.js"></script> <script type="text/javascript" src="selectable.js"></script> - - <style type="text/css"> - html { border: 0; } - </style> - - - </head> <body> -<h1 id="header">jQuery UI Selectable Test Suite</h1> -<h2 id="banner"></h2> -<h2 id="userAgent"></h2> - -<ol id="tests"></ol> - -<div id="main" style="position: absolute; top: -10000px; border: 1px solid black; padding: 10px; margin: 10px;"> +<div id="main"> <ul id="selectable1"> <li>Item 1</li> <li>Item 2</li> diff --git a/tests/slider.html b/tests/slider.html index fd352ef87..22f0d581b 100644 --- a/tests/slider.html +++ b/tests/slider.html @@ -3,35 +3,20 @@ <head> <title>jQuery UI Slider Test Suite</title> - <link rel="stylesheet" href="qunit/testsuite.css" type="text/css" media="screen"> - <script type="text/javascript" src="../jquery-1.2.6.js"></script> <script type="text/javascript" src="../ui/ui.core.js"></script> <script type="text/javascript" src="../ui/ui.slider.js"></script> + <link type="text/css" href="testsuite.css" rel="stylesheet" /> + <script type="text/javascript" src="testsuite.js"></script> <script type="text/javascript" src="qunit/testrunner.js"></script> <script type="text/javascript" src="simulate/jquery.simulate.js"></script> <script type="text/javascript" src="slider.js"></script> - - <style type="text/css"> - - - - </style> - - - </head> <body> -<h1 id="header">jQuery UI Slider Test Suite</h1> -<h2 id="banner"></h2> -<h2 id="userAgent"></h2> - -<ol id="tests"></ol> - -<div id="main" style="position:absolute;top:-20000px"> +<div id="main"> <div id="slider1"></div> <div id="slider3" style="position: relative; margin: 40px; width: 217px; height: 28px;"> <div class="ui-slider-handle" style="position: absolute; height: 21px; left: 0px; bottom: 0px; width: 17px;"></div> diff --git a/tests/sortable.html b/tests/sortable.html index 4fa00cb76..2a70b8c8f 100644 --- a/tests/sortable.html +++ b/tests/sortable.html @@ -3,35 +3,20 @@ <head> <title>jQuery UI Sortable Test Suite</title> - <link rel="stylesheet" href="qunit/testsuite.css" type="text/css" media="screen"> - <script type="text/javascript" src="../jquery-1.2.6.js"></script> <script type="text/javascript" src="../ui/ui.core.js"></script> <script type="text/javascript" src="../ui/ui.sortable.js"></script> + <link type="text/css" href="testsuite.css" rel="stylesheet" /> + <script type="text/javascript" src="testsuite.js"></script> <script type="text/javascript" src="qunit/testrunner.js"></script> <script type="text/javascript" src="simulate/jquery.simulate.js"></script> <script type="text/javascript" src="sortable.js"></script> - - <style type="text/css"> - html { border: 0; } - #main { - position:absolute !important; - top: -1000px !important; - left: -1000px !important; - } - </style> </head> <body> -<h1 id="header">jQuery UI Sortable Test Suite</h1> -<h2 id="banner"></h2> -<h2 id="userAgent"></h2> - -<ol id="tests"></ol> - -<div id="main" style="border: 1px solid black; padding: 10px; margin: 10px;"> +<div id="main"> <ul id="sortable"> <li>Item 1</li> <li>Item 2</li> diff --git a/tests/tabs.html b/tests/tabs.html index 78459b878..b8e904abb 100644 --- a/tests/tabs.html +++ b/tests/tabs.html @@ -3,36 +3,22 @@ <head> <title>jQuery UI Tabs Test Suite</title> - <link rel="stylesheet" href="qunit/testsuite.css" type="text/css" media="screen"> - <script type="text/javascript" src="../jquery-1.2.6.js"></script> <script type="text/javascript" src="../ui/ui.core.js"></script> <script type="text/javascript" src="../ui/ui.tabs.js"></script> + <link type="text/css" href="testsuite.css" rel="stylesheet" /> + <script type="text/javascript" src="testsuite.js"></script> <script type="text/javascript" src="qunit/testrunner.js"></script> <script type="text/javascript" src="simulate/jquery.simulate.js"></script> + <script type="text/javascript" src="plugins/cookie/jquery.cookie.js"></script> <script type="text/javascript" src="tabs.js"></script> - - <style type="text/css"> - .ui-tabs-hide { - display: none !important; - } - </style> - - - </head> <body> -<h1 id="header">jQuery UI Tabs Test Suite</h1> -<h2 id="banner"></h2> -<h2 id="userAgent"></h2> - -<ol id="tests"></ol> - - <div id="main" style="position:absolute;top:-20000px"> + <div id="main"> <div id="tabs1"> <ul> diff --git a/tests/testsuite.css b/tests/testsuite.css new file mode 100644 index 000000000..b511c67ce --- /dev/null +++ b/tests/testsuite.css @@ -0,0 +1,4 @@ +@import url("qunit/testsuite.css");
+html { border: 0; }
+.xerror, .error, .ui-tabs-hide { display: none }
+#main { position: absolute; top: -10000px; left: -10000px; }
diff --git a/tests/testsuite.js b/tests/testsuite.js new file mode 100644 index 000000000..5ae100a7d --- /dev/null +++ b/tests/testsuite.js @@ -0,0 +1,10 @@ +$(function() {
+
+$('body').prepend(
+ '<h1 id="header">' + document.title + '</h1>' +
+ '<h2 id="banner"></h2>' +
+ '<h2 id="userAgent"></h2>' +
+ '<ol id="tests"></ol>'
+);
+
+});
diff --git a/tests/ui.html b/tests/ui.html index a0de5cb8d..5d69a82db 100644 --- a/tests/ui.html +++ b/tests/ui.html @@ -3,8 +3,6 @@ <head> <title>jQuery UI Test Suite</title> - <link rel="stylesheet" href="qunit/testsuite.css" type="text/css" media="screen"> - <script type="text/javascript" src="../jquery-1.2.6.js"></script> <script type="text/javascript" src="../ui/ui.core.js"></script> <script type="text/javascript" src="../ui/ui.accordion.js"></script> @@ -19,19 +17,16 @@ <script type="text/javascript" src="../ui/ui.sortable.js"></script> <script type="text/javascript" src="../ui/ui.tabs.js"></script> + <link type="text/css" href="testsuite.css" rel="stylesheet" /> + <script type="text/javascript" src="testsuite.js"></script> <script type="text/javascript" src="qunit/testrunner.js"></script> - <script type="text/javascript" src="ui.js"></script> + <script type="text/javascript" src="simulate/jquery.simulate.js"></script> + <script type="text/javascript" src="ui.js"></script> </head> <body> -<h1 id="header">jQuery UI Test Suite</h1> -<h2 id="banner"></h2> -<h2 id="userAgent"></h2> - -<ol id="tests"></ol> - -<div id="main" style="position: absolute; top: -10000px; border: 1px solid black; padding: 10px; margin: 10px;"> +<div id="main"> </div> |