Skip to content

Commit

Permalink
updated QUnit to v1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Stanley committed Mar 8, 2012
1 parent 0a3f541 commit 8c19921
Show file tree
Hide file tree
Showing 10 changed files with 2,479 additions and 1,593 deletions.
2 changes: 1 addition & 1 deletion Smartphone/TEMPLATE/test_app/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
-->
<widget xmlns="http://www.w3.org/ns/widgets"
xmlns:rim="http://www.blackberry.com/ns/widgets"
version="1.0.0.1" id="extUnitTestsX" xml:lang="en">
version="1.0.0.1" id="extUnitTests" xml:lang="en">

<name>ext Tests</name>
<description>Unit tests for blackberry.template extension</description>
Expand Down
51 changes: 8 additions & 43 deletions Smartphone/TEMPLATE/test_app/index.html
Original file line number Diff line number Diff line change
@@ -1,50 +1,15 @@
<!DOCTYPE html>
<!--
* Copyright 2012 Research In Motion Limited.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
-->
<html lang="en">
<html>
<head>
<title>blackberry.template unit tests (QUnit)</title>
<link rel="stylesheet" href="qunit/qunit.css" media="screen">

<!-- reference your own javascript files here -->
<style>
#description {
color: #2b81af;
background-color: #D2E0E6;
font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial;
padding: 0.5em 0 0.5em 2em;
font-size: 1.25em;
}
</style>
<!-- test runner files -->
<meta charset="UTF-8" />
<title>blackberry.template unit tests</title>
<link rel="stylesheet" href="qunit/qunit.css">
<script src="qunit/qunit.js"></script>
<!-- reference your own javascript files here -->
<script src="tests.js"></script>

</head>
<body class="flora">
<h1 id="qunit-header">blackberry.template unit tests</h1>
<h2 id="qunit-banner"></h2>
<div id="qunit-testrunner-toolbar"></div>
<h2 id="qunit-userAgent"></h2>
<div id="description"> The following unit tests (powered by QUnit) evaluates the functions and properties of a 'blackberry.template' demo JavaScript extension.</div>
<ol id="qunit-tests"></ol>
<body>
<div id="qunit"></div>
<div id="qunit-fixture">test markup</div>

<div id="playArea"></div>

<!-- JavaScript at the bottom for fast page loading -->
</body>
</html>
</html>
148 changes: 116 additions & 32 deletions Smartphone/TEMPLATE/test_app/qunit/qunit.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
/**
* QUnit v1.4.0pre - A JavaScript Unit Testing Framework
*
* http://docs.jquery.com/QUnit
*
* Copyright (c) 2012 John Resig, Jörn Zaefferer
* Dual licensed under the MIT (MIT-LICENSE.txt)
* or GPL (GPL-LICENSE.txt) licenses.
*/

/** Font Family and Sizes */

#qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult {
font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial;
font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif;
}

#qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; }
Expand All @@ -10,7 +20,7 @@

/** Resets */

#qunit-tests, #qunit-tests li ol, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult {
#qunit-tests, #qunit-tests ol, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult {
margin: 0;
padding: 0;
}
Expand All @@ -20,23 +30,42 @@

#qunit-header {
padding: 0.5em 0 0.5em 1em;

color: #fff;
text-shadow: rgba(0, 0, 0, 0.5) 4px 4px 1px;

color: #8699a4;
background-color: #0d3349;


font-size: 1.5em;
line-height: 1em;
font-weight: normal;

border-radius: 15px 15px 0 0;
-moz-border-radius: 15px 15px 0 0;
-webkit-border-top-right-radius: 15px;
-webkit-border-top-left-radius: 15px;
}

#qunit-header a {
text-decoration: none;
color: #c2ccd1;
}

#qunit-header a:hover,
#qunit-header a:focus {
color: #fff;
}

#qunit-header label {
display: inline-block;
}

#qunit-banner {
height: 5px;
}

#qunit-testrunner-toolbar {
padding: 0em 0 0.5em 2em;
padding: 0.5em 0 0.5em 2em;
color: #5E740B;
background-color: #eee;
}

#qunit-userAgent {
Expand All @@ -59,25 +88,78 @@
list-style-position: inside;
}

#qunit-tests.hidepass li.pass, #qunit-tests.hidepass li.running {
display: none;
}

#qunit-tests li strong {
cursor: pointer;
}

#qunit-tests li ol {
#qunit-tests li a {
padding: 0.5em;
color: #c2ccd1;
text-decoration: none;
}
#qunit-tests li a:hover,
#qunit-tests li a:focus {
color: #000;
}

#qunit-tests ol {
margin-top: 0.5em;
padding: 0.5em;

background-color: #fff;

border-radius: 15px;
-moz-border-radius: 15px;
-webkit-border-radius: 15px;

box-shadow: inset 0px 2px 13px #999;
-moz-box-shadow: inset 0px 2px 13px #999;
-webkit-box-shadow: inset 0px 2px 13px #999;
}

#qunit-tests table {
border-collapse: collapse;
margin-top: .2em;
}

#qunit-tests th {
text-align: right;
vertical-align: top;
padding: 0 .5em 0 0;
}

#qunit-tests td {
vertical-align: top;
}

#qunit-tests pre {
margin: 0;
white-space: pre-wrap;
word-wrap: break-word;
}

#qunit-tests del {
background-color: #e0f2be;
color: #374e0c;
text-decoration: none;
}

#qunit-tests ins {
background-color: #ffcaca;
color: #500;
text-decoration: none;
}

/*** Test Counts */

#qunit-tests b.counts { color: black; }
#qunit-tests b.passed { color: #5E740B; }
#qunit-tests b.failed { color: #710909; }

#qunit-tests li li {
margin: 0.5em;
padding: 0.4em 0.5em 0.4em 0.5em;
Expand All @@ -94,13 +176,11 @@
border-left: 26px solid #C6E746;
}

#qunit-tests li.pass { color: #528CE0; background-color: #D2E0E6; }
#qunit-tests li.pass span.test-name { color: #366097; }

#qunit-tests li li.pass span.test-actual,
#qunit-tests li li.pass span.test-expected { color: #999999; }
#qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; }
#qunit-tests .pass .test-name { color: #366097; }

strong b.pass { color: #5E740B; }
#qunit-tests .pass .test-actual,
#qunit-tests .pass .test-expected { color: #999999; }

#qunit-banner.qunit-pass { background-color: #C6E746; }

Expand All @@ -110,33 +190,35 @@ strong b.pass { color: #5E740B; }
color: #710909;
background-color: #fff;
border-left: 26px solid #EE5757;
white-space: pre;
}

#qunit-tests li.fail { color: #000000; background-color: #EE5757; }
#qunit-tests li.fail span.test-name,
#qunit-tests li.fail span.module-name { color: #000000; }
#qunit-tests > li:last-child {
border-radius: 0 0 15px 15px;
-moz-border-radius: 0 0 15px 15px;
-webkit-border-bottom-right-radius: 15px;
-webkit-border-bottom-left-radius: 15px;
}

#qunit-tests li li.fail span.test-actual { color: #EE5757; }
#qunit-tests li li.fail span.test-expected { color: green; }
#qunit-tests .fail { color: #000000; background-color: #EE5757; }
#qunit-tests .fail .test-name,
#qunit-tests .fail .module-name { color: #000000; }

strong b.fail { color: #710909; }
#qunit-tests .fail .test-actual { color: #EE5757; }
#qunit-tests .fail .test-expected { color: green; }

#qunit-banner.qunit-fail,
#qunit-testrunner-toolbar { background-color: #EE5757; }
#qunit-banner.qunit-fail { background-color: #EE5757; }


/** Footer */
/** Result */

#qunit-testresult {
padding: 0.5em 0.5em 0.5em 2.5em;

color: #2b81af;
background-color: #D2E0E6;

border-radius: 0 0 15px 15px;
-moz-border-radius: 0 0 15px 15px;
-webkit-border-bottom-right-radius: 15px;
-webkit-border-bottom-left-radius: 15px;
border-bottom: 1px solid white;
}

/** Fixture */
Expand All @@ -145,4 +227,6 @@ strong b.fail { color: #710909; }
position: absolute;
top: -10000px;
left: -10000px;
width: 1000px;
height: 1000px;
}
Loading

0 comments on commit 8c19921

Please sign in to comment.