Fix jquery.client.test breakage
[lhc/web/wiklou.git] / tests / qunit / index.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>MediaWiki JavaScript Test Suite</title>
5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6 <!-- MediaWiki Modules -->
7
8 <!-- MW: startup -->
9 <script>
10 function startUp(){
11 mw.config = new mw.Map( false );
12
13 /**
14 * Simulate an average mw.config context
15 */
16 /* StartUp module */
17 mw.config.set({"wgLoadScript": "/mw/trunk/phase3/load.php", "debug": true, "skin": "vector", "stylepath": "/mw/trunk/phase3/skins", "wgUrlProtocols": "http\\:\\/\\/|https\\:\\/\\/|ftp\\:\\/\\/|irc\\:\\/\\/|ircs\\:\\/\\/|gopher\\:\\/\\/|telnet\\:\\/\\/|nntp\\:\\/\\/|worldwind\\:\\/\\/|mailto\\:|news\\:|svn\\:\\/\\/|git\\:\\/\\/|mms\\:\\/\\/|\\/\\/", "wgArticlePath": "/mw/trunk/phase3/index.php/$1", "wgScriptPath": "/mw/trunk/phase3", "wgScriptExtension": ".php", "wgScript": "/mw/trunk/phase3/index.php", "wgVariantArticlePath": false, "wgActionPaths": [], "wgServer": "http://localhost", "wgUserLanguage": "en", "wgContentLanguage": "en", "wgVersion": "1.19alpha", "wgEnableAPI": true, "wgEnableWriteAPI": true, "wgDefaultDateFormat": "dmy", "wgMonthNames": ["", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], "wgMonthNamesShort": ["", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], "wgMainPageTitle": "Main Page", "wgFormattedNamespaces": {"-2": "Media", "-1": "Special", "0": "", "1": "Talk", "2": "User", "3": "User talk", "4": "Testopedia", "5": "Testopedia talk", "6": "File", "7": "File talk", "8": "MediaWiki", "9": "MediaWiki talk", "10": "Template", "11": "Template talk", "12": "Help", "13": "Help talk", "14": "Category", "15": "Category talk"}, "wgNamespaceIds": {"media": -2, "special": -1, "": 0, "talk": 1, "user": 2, "user_talk": 3, "testopedia": 4, "testopedia_talk": 5, "file": 6, "file_talk": 7, "mediawiki": 8, "mediawiki_talk": 9, "template": 10, "template_talk": 11, "help": 12, "help_talk": 13, "category": 14, "category_talk": 15, "image": 6, "image_talk": 7, "project": 4, "project_talk": 5}, "wgSiteName": "Testopedia", "wgFileExtensions": ["png", "gif", "jpg", "jpeg"], "wgDBname": "mediawiki", "wgFileCanRotate": true, "wgAvailableSkins": {"chick": "Chick", "cologneblue": "CologneBlue", "modern": "Modern", "monobook": "MonoBook", "myskin": "MySkin", "nostalgia": "Nostalgia", "simple": "Simple", "standard": "Standard", "vector": "Vector"}, "wgExtensionAssetsPath": "/mw/trunk/phase3/extensions", "wgCookiePrefix": "mediawiki", "wgResourceLoaderMaxQueryLength": -1, "wgCaseSensitiveNamespaces": []});
18
19 /* WikiPage specific */
20 mw.config.set({"wgCanonicalNamespace": "", "wgCanonicalSpecialPageName": false, "wgNamespaceNumber": 0, "wgPageName": "Sandbox", "wgTitle": "Sandbox", "wgCurRevisionId": 486, "wgArticleId": 84, "wgIsArticle": true, "wgAction": "view", "wgUserName": null, "wgUserGroups": ["*"], "wgCategories": [], "wgBreakFrames": false, "wgPageContentLanguage": "en", "wgSeparatorTransformTable": ["", ""], "wgDigitTransformTable": ["", ""], "wgRestrictionEdit": [], "wgRestrictionMove": [], "wgRedirectedFrom": "Sandbox"});
21
22 /**
23 * Fix wgScriptPath and the like to the real thing,
24 * instead of fake ones (for access to /tests/qunit/data/)
25 */
26
27 // Regular expression to extract the path for the QUnit tests
28 // Takes into account that tests could be run from a file:// URL
29 // by excluding the 'index.html' part from the URL
30 var rePath = /(?:[^#\?](?!index.html))*\/?/;
31
32 // Extract path to /tests/qunit/
33 var qunitTestsPath = rePath.exec( location.pathname )[0];
34
35 // Traverse up to script path
36 var pathParts = qunitTestsPath.split( '/' );
37 pathParts.pop(); pathParts.pop(); pathParts.pop();
38 var scriptPath = pathParts.join( '/' );
39
40 mw.config.set({
41 "wgServer": location.protocol + '//' + location.host,
42 "wgScriptPath": scriptPath,
43 "wgLoadScript": scriptPath + '/load.php',
44 "stylepath": scriptPath + '/skins',
45 "wgArticlePath": scriptPath + '/index.php/$1',
46 "wgScript": scriptPath + '/index.php',
47 "wgExtensionAssetsPath": scriptPath + '/extensions'
48 });
49 }
50 </script>
51
52 <!-- MW: jquery|mediawiki -->
53 <script src="../../resources/jquery/jquery.js"></script>
54 <script src="../../resources/mediawiki/mediawiki.js"></script>
55
56 <!-- MW: mediawiki.page.startup -->
57 <script src="../../resources/jquery/jquery.client.js"></script>
58 <script src="../../resources/mediawiki.page/mediawiki.page.startup.js"></script>
59
60 <!-- MW: mediawiki.user|mediawiki.util|mediawiki.page.ready -->
61 <script src="../../resources/jquery/jquery.cookie.js"></script>
62 <script src="../../resources/mediawiki/mediawiki.user.js"></script>
63
64 <script src="../../resources/jquery/jquery.messageBox.js"></script>
65 <script src="../../resources/jquery/jquery.mwExtension.js"></script>
66 <script src="../../resources/mediawiki/mediawiki.util.js"></script>
67
68 <script src="../../resources/jquery/jquery.checkboxShiftClick.js"></script>
69 <script src="../../resources/jquery/jquery.makeCollapsible.js"></script>
70 <script src="../../resources/jquery/jquery.placeholder.js"></script>
71 <script src="../../resources/mediawiki.page/mediawiki.page.ready.js"></script>
72
73 <!-- MW: user.options -->
74 <script>
75 mw.user.options.set({"skin": "vector"});
76 </script>
77
78 <!-- MW: Non-default modules -->
79 <script src="../../resources/jquery/jquery.autoEllipsis.js"></script>
80 <script src="../../resources/jquery/jquery.byteLength.js"></script>
81 <script src="../../resources/jquery/jquery.byteLimit.js"></script>
82 <script src="../../resources/jquery/jquery.colorUtil.js"></script>
83 <script src="../../resources/jquery/jquery.delayedBind.js"></script>
84 <script src="../../resources/jquery/jquery.getAttrs.js"></script>
85 <script src="../../resources/jquery/jquery.highlightText.js"></script>
86 <script src="../../resources/jquery/jquery.localize.js"></script>
87 <script src="../../resources/jquery/jquery.tabIndex.js"></script>
88 <script src="../../resources/jquery/jquery.tablesorter.js"></script>
89 <script src="../../resources/jquery/jquery.textSelection.js"></script>
90 <script src="../../resources/mediawiki/mediawiki.Title.js"></script>
91 <script src="../../resources/mediawiki.language/mediawiki.language.js"></script>
92 <script src="../../resources/mediawiki/mediawiki.jqueryMsg.js"></script>
93 <script src="../../resources/mediawiki.special/mediawiki.special.js"></script>
94 <script src="../../resources/mediawiki.special/mediawiki.special.recentchanges.js"></script>
95
96 <!-- QUnit: Load framework -->
97 <link rel="stylesheet" href="../../resources/jquery/jquery.qunit.css" />
98 <script src="../../resources/jquery/jquery.qunit.js"></script>
99 <script src="../../resources/jquery/jquery.qunit.completenessTest.js"></script>
100 <script src="data/testrunner.js"></script>
101
102 <!-- QUnit: Load test suites (maintain the same order as above please) -->
103 <script src="suites/resources/mediawiki/mediawiki.jscompat.test.js"></script>
104 <script src="suites/resources/mediawiki/mediawiki.test.js"></script>
105 <script src="suites/resources/mediawiki/mediawiki.user.test.js"></script>
106
107 <script src="suites/resources/jquery/jquery.client.test.js"></script>
108 <script src="suites/resources/jquery/jquery.mwExtension.test.js"></script>
109 <script src="suites/resources/mediawiki/mediawiki.util.test.js"></script>
110
111 <script src="suites/resources/jquery/jquery.autoEllipsis.test.js"></script>
112 <script src="suites/resources/jquery/jquery.byteLength.test.js"></script>
113 <script src="suites/resources/jquery/jquery.byteLimit.test.js"></script>
114 <script src="suites/resources/jquery/jquery.colorUtil.test.js"></script>
115 <script src="suites/resources/jquery/jquery.delayedBind.test.js"></script>
116 <script src="suites/resources/jquery/jquery.getAttrs.test.js"></script>
117 <script src="suites/resources/jquery/jquery.highlightText.test.js"></script>
118 <script src="suites/resources/jquery/jquery.localize.test.js"></script>
119 <script src="suites/resources/jquery/jquery.tabIndex.test.js"></script>
120 <script src="suites/resources/jquery/jquery.tablesorter.test.js" charset="UTF-8"></script>
121 <script src="suites/resources/jquery/jquery.textSelection.test.js" charset="UTF-8"></script>
122 <script src="suites/resources/mediawiki/mediawiki.Title.test.js"></script>
123 <script src="suites/resources/mediawiki/mediawiki.jqueryMsg.test.js"></script>
124 <script src="suites/resources/mediawiki.special/mediawiki.special.recentchanges.test.js"></script>
125 </head>
126 <body>
127 <h1 id="qunit-header">MediaWiki JavaScript Test Suite</h1>
128 <h2 id="qunit-banner"></h2>
129 <div id="qunit-testrunner-toolbar">
130 <p><a href="http://www.mediawiki.org/wiki/Manual:JavaScript_unit_testing">See testing documentation on mediawiki.org</a></p>
131 </div>
132 <h2 id="qunit-userAgent"></h2>
133 <ol id="qunit-tests"></ol>
134 <div id="qunit-fixture"></div>
135
136 <!-- Scripts inserting stuff here shall remove it themselfs! -->
137 <div id="content"></div>
138 </body>
139 </html>