aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/css.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/css.js')
-rw-r--r--tests/lib/css.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/lib/css.js b/tests/lib/css.js
new file mode 100644
index 000000000..37353e912
--- /dev/null
+++ b/tests/lib/css.js
@@ -0,0 +1,23 @@
+(function() {
+
+function includeStyle( url ) {
+ document.write( "<link rel='stylesheet' href='../../../" + url + "'>" );
+}
+
+// Find the script element
+var scripts = document.getElementsByTagName( "script" );
+var script = scripts[ scripts.length - 1 ];
+
+// Load the modules
+var modules = script.getAttribute( "data-modules" );
+if ( modules ) {
+ modules = modules.split( /\s+/ );
+ for ( var i = 0; i < modules.length; i++ ) {
+ includeStyle( "themes/base/" + modules[ i ] + ".css" );
+ }
+}
+
+// Load the QUnit stylesheet
+includeStyle( "external/qunit/qunit.css" );
+
+} )();