summaryrefslogtreecommitdiff
path: root/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit
diff options
context:
space:
mode:
Diffstat (limited to 'www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit')
-rw-r--r--www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/.bower.json14
-rw-r--r--www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/.gitignore8
-rw-r--r--www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/AUTHORS.txt55
-rw-r--r--www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/History.md462
-rw-r--r--www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/README.md59
-rw-r--r--www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/canvas/README.md16
-rw-r--r--www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/canvas/canvas-test.js76
-rw-r--r--www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/canvas/canvas.html15
-rw-r--r--www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/canvas/qunit-canvas.js6
-rw-r--r--www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/close-enough/README.md17
-rw-r--r--www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/close-enough/close-enough-test.js35
-rw-r--r--www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/close-enough/close-enough.html14
-rw-r--r--www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/close-enough/qunit-close-enough.js32
-rw-r--r--www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/composite/README.md12
-rw-r--r--www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/composite/composite-demo-test.html26
-rw-r--r--www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/composite/index.html33
-rw-r--r--www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/composite/qunit-composite.css13
-rw-r--r--www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/composite/qunit-composite.js102
-rw-r--r--www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/junitlogger/index.html44
-rw-r--r--www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/junitlogger/junitlogger.js268
-rw-r--r--www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/phantomjs/README.md14
-rw-r--r--www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/phantomjs/runner.js97
-rw-r--r--www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/step/README.md18
-rw-r--r--www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/step/qunit-step.js25
-rw-r--r--www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/step/step-test.js13
-rw-r--r--www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/step/step.html14
-rw-r--r--www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/themes/README.md6
-rw-r--r--www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/themes/gabe.css362
-rw-r--r--www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/themes/gabe.html14
-rw-r--r--www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/themes/nv.css208
-rw-r--r--www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/themes/nv.html14
-rw-r--r--www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/grunt.js114
-rw-r--r--www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/package.json37
-rw-r--r--www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/qunit/qunit.css235
-rw-r--r--www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/qunit/qunit.js1977
35 files changed, 4455 insertions, 0 deletions
diff --git a/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/.bower.json b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/.bower.json
new file mode 100644
index 00000000..76412286
--- /dev/null
+++ b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/.bower.json
@@ -0,0 +1,14 @@
+{
+ "name": "qunit",
+ "homepage": "https://github.com/jquery/qunit",
+ "version": "1.10.0",
+ "_release": "1.10.0",
+ "_resolution": {
+ "type": "version",
+ "tag": "v1.10.0",
+ "commit": "900f72051b0112342feda3d700a7a049d886b9ce"
+ },
+ "_source": "https://github.com/jquery/qunit.git",
+ "_target": "~1.10",
+ "_originalSource": "qunit"
+} \ No newline at end of file
diff --git a/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/.gitignore b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/.gitignore
new file mode 100644
index 00000000..e41c37d5
--- /dev/null
+++ b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/.gitignore
@@ -0,0 +1,8 @@
+.project
+*~
+*.diff
+*.patch
+.DS_Store
+.settings
+node_modules
+dist/
diff --git a/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/AUTHORS.txt b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/AUTHORS.txt
new file mode 100644
index 00000000..2b56decb
--- /dev/null
+++ b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/AUTHORS.txt
@@ -0,0 +1,55 @@
+Jörn Zaefferer <joern.zaefferer@gmail.com>
+Ariel Flesler <aflesler@gmail.com>
+Scott González <scott.gonzalez@gmail.com>
+Richard Worth <rdworth@gmail.com>
+Philippe Rathé <prathe@gmail.com>
+John Resig <jeresig@gmail.com>
+Will Moffat <will_git@hamstersoup.com>
+Jan Kassens <jan@kassens.net>
+Ziling Zhao <zizhao@cisco.com>
+Ryan Szulczewski <musicmanryan@gmail.com>
+Chris Lloyd <christopher.lloyd@gmail.com>
+Louis-Rémi Babé <public@lrbabe.com>
+Jake Archibald <jake.archibald@bbc.co.uk>
+Frances Berriman <frances.berriman@bbc.co.uk>
+Rune Halvorsen <runefh@gmail.com>
+Chris Thatcher <thatcher.christopher@gmail.com>
+Fábio Rehm <fgrehm@gmail.com>
+Leon Sorokin <leeoniya@gmail.com>
+Douglas Neiner <doug@pixelgraphics.us>
+Paul Elliott <paul@hashrocket.com>
+Nikita Vasilyev <me@elv1s.ru>
+Benjamin Lee <leebenjp@gmail.com>
+Paul Irish <paul.irish@gmail.com>
+Oleg Slobodskoi <oleg008@gmail.com>
+Anton Matzneller <obhvsbypqghgc@gmail.com>
+Aurélien Bombo
+Mathias Bynens <mathias@qiwi.be>
+Erik Vold <erikvvold@gmail.com>
+Wesley Walser <waw325@gmail.com>
+Rob Kinninmont <robk@twitter.com>
+Marc Portier <marc.portier@gmail.com>
+Michael Righi <michael@righi.me>
+Timo Tijhof <krinklemail@gmail.com>
+Jan Alonzo <jmalonzo@taguchimail.com>
+Daniel Trebbien <dtrebbien@gmail.com>
+Bob Fanger <bfanger@gmail.com>
+Markus Messner-Chaney <markus.messner-chaney@xing.com>
+Trevor Parscal <trevorparscal@gmail.com>
+Ashar Voultoiz <hashar@free.fr>
+Jimmy Mabey <jimmy@velsoft.com>
+Domenic Denicola <domenic@domenicdenicola.com>
+Mike Sherov <mike.sherov@gmail.com>
+Seong-A Kong <simonz@daumcorp.com>
+Graham Conzett <conzett@gmail.com>
+Niall Smart <niall@pobox.com>
+Johan Sörlin <spocke@moxiecode.com>
+Gijs Kruitbosch <gijskruitbosch@gmail.com>
+Erkan Yilmaz <erkan77@gmail.com>
+Jonathan Sanchez <jsanchezpando@cirb.irisnet.be>
+Keith Cirkel <github@keithcirkel.co.uk>
+Rick Waldron <waldron.rick@gmail.com>
+Herbert Vojčík <herby@mailbox.sk>
+Richard Gibson <richard.gibson@gmail.com>
+Alex J Burke <alex@alexjeffburke.com>
+Sergii Kliuchnyk <sergiikliuchnyk@gmail.com>
diff --git a/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/History.md b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/History.md
new file mode 100644
index 00000000..94568f4c
--- /dev/null
+++ b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/History.md
@@ -0,0 +1,462 @@
+1.10.0 / 2012-08-30
+==================
+
+ * Simplify licensing: Only MIT, no more MIT/GPL dual licensing.
+ * Scroll the window back to top after tests finished running. Fixes #304
+ * Simplify phantomjs runner to use module property in testDone callback
+ * Adds module and test name to the information that is returned in the callback provided to QUnit.log(Function). Fixes #296
+ * Make QUnit.expect() (without arguments) a getter. Fixes #226
+ * Compare the ES6 sticky (y) property for RegExp. Can't add to tests yet. Fixes #284 - deepEqual for RegExp should compare
+ * onerror: force display of global errors despite URL parameters. Fixes #288 - Global failures can be filtered out by test-limiting URL parameters
+ * Remove conditional codepath based on jQuery presence from reset().
+ * Add module filter to UI
+ * Keep a local reference to Date. Fixes #283.
+ * Update copyright to jQuery Foundation.
+
+1.9.0 / 2012-07-11
+==================
+ * added jsdoc for QUnit.assert functions
+ * Styling: radius to 5px and small pass/error border, remove inner shadow
+ * Move checkboxes into toolbar and give them labels and descriptions (as tooltip). Fixes #274 - Improve urlFilter API and UI
+ * Where we recieve no exception in throws() use a relevant message.
+ * Also make module filter case-insensitive. Follow-up to #252
+ * Banner: Link should ignore "testNumber" and "module". Fixes #270
+ * Rename assert.raises to assert.throws. Fixes #267
+ * Change package.json name property to 'qunitjs' to avoid conflicht with node-qunit; will publish next release to npm
+
+1.8.0 / 2012-06-14
+==================
+ * Improve window.onerror handling
+ * (issue #260) config.current should be reset at the right time.
+ * Filter: Implement 'module' url parameter. Fixes #252
+ * raises: ignore global exceptions stemming from test. Fixes #257 - Globally-executed errors sneak past raises in IE
+
+1.7.0 / 2012-06-07
+==================
+
+ * Add config.requireExpects. Fixes #207 - Add option to require all tests to call expect().
+ * Improve extractStacktrace() implementation. Fixes #254 - Include all relevant stack lines
+ * Make filters case-insensitive. Partial fix for #252
+ * is() expects lowercase types. Fixes #250 - Expected Date value is not displayed properly
+ * Fix phantomjs addon header and add readme. Fixes #239
+ * Add some hints to composite addon readme. Fixes #251
+ * Track tests by the order in which they were run and create rerun links based on that number. Fixes #241 - Make Rerun link run only a single test.
+ * Use QUnit.push for raises implementation. Fixes #243
+ * CLI runner for phantomjs
+ * Fix jshint validation until they deal with /** */ comments properly
+ * Update validTest() : Simplify logic, clarify vars and add comments
+ * Refactor assertion helpers into QUnit.assert (backwards compatible)
+ * Add Rerun link to placeholders. Fixes #240
+
+1.6.0 / 2012-05-04
+==================
+
+ * Save stack for each test, use that for failed expect() results, points at the line where test() was called. Fixes #209
+ * Prefix test-output id and ignore that in noglobals check. Fixes #212
+ * Only check for an exports object to detect a CommonJS enviroment. Fixes #237 - Incompatibility with require.js
+ * Add testswarm integration as grunt task
+ * Added padding on URL config checkboxes.
+ * Cleanup composite addon: Use callback registration instead of overwriting them. Set the correct src on rerun link (and dblclick). Remove the composite test itself, as that was a crazy hack not worth maintaining
+ * Cleanup reset() test and usage - run testDone callback first, to allow listeneres ignoring reset assertions
+ * Double clicking on composite test rows opens individual test page
+ * test-message for all message-bearing API reporting details
+
+1.5.0 / 2012-04-04
+==================
+
+ * Modify "Running..." to display test name. Fixes #220
+ * Fixed clearing of sessionStorage in Firefox 3.6.
+ * Fixes #217 by calling "block" with config.current.testEnvironment
+ * Add stats results to data. QUnit.jUnitReport function take one argument { xml:'<?xml ...', results:{failed:0, passed:0, total:0, time:0} }
+ * Add link to MDN about stack property
+
+1.4.0 / 2012-03-10
+==================
+
+ * Prefix test-related session-storage items to make removal more specific. Fixes #213 - Keep hide-passed state when clearing session storage
+ * Update grunt.js with seperate configs for qunit.js and grunt.js, also add tests but disable for now, not passing yet. Add grunt to devDependencies
+ * typo
+ * Cleanup grunt.js, no need for the banner
+ * Fix lint errors and some formatting issues. Use QUnit.pushFailure for noglobals and global error handler.
+ * Fix a missing expect in logs test
+ * Add grunt.js configuration and include some usage instructions in the readme
+ * Update package.json
+ * Partially revert af27eae841c3e1c01c46de72d676f1047e1ee375 - can't move reset around, so also don't wrap in try-catch, as the result of that is effectively swallowed. Can't output the result as the outputting is already done.
+ * Add QUnit.pushFailure to log error conditions like exceptions. Accepts stacktrace as second argument, allowing extraction with catched exceptions (useful even in Safari). Remove old fail() function that would just log to console, not useful anymore as regular test output is much more useful by now. Move up QUnit.reset() call to just make that another failed assertion. Used to not make a test fail. Fixes #210
+ * Update equals and same deprecations to use QUnit.push to provide correct source lines. Fixes #211
+ * Add a test file for narwhal integration. Has to use print instead of console.log. Fails when an assertion fails, something about setInterval...
+ * Apply notrycatch option to setup and teardown as well. Fixes #203. Reorder noglobals check to allow teardown to remove globals that were introduced intentionally. Fixes #204
+ * Extend exports object with QUnit properties at the end of the file to export everything.
+ * Output source line for ok() assertions. Fixes #202
+ * Make test fail if no assertions run. Fixes #178
+ * Sort object output alphabetically in order to improve diffs of objects where properties were set in a different order. Fixes #206
+ * Revert "Change fixture reset behavior", changing #194 and #195 to wontfix.
+
+1.3.0 / 2012-02-26
+==================
+
+ * Cleanup test markup
+ * Fix the jQuery branch of fixture reset. Would break when no fixture exists.
+ * Added initial version of a junitlogger addon.
+ * Escape document.title before inserting into markup. Extends fix for #127
+ * Catch assertions running outside of test() context, make sure source is provided even for ok(). Fixes #98
+ * Improve global object access, based on comments for 1a9120651d5464773256d8a1f2cf2eabe38ea5b3
+ * Clear all sessionStorage entries once all tests passed. Helps getting rid of items from renamed tests. Fixes #101
+ * Set fixed dimensions for #qunit-fixture. Fixes #114
+ * Extend nodejs test runner to check for stacktrace output, twice
+ * Extend nodejs test runner to check for stacktrace output
+ * Generate more base markup, but allow the user to exclude that completelty or choose their own. Fixes #127
+ * Add a simple test file to check basic nodejs integration works
+ * Check for global object to find setTimeout in node
+ * Fix CommonJS export by assigning QUnit to module.exports.
+ * Remove the testEnviromentArg to test(). Most obscure, never used anywhere. test() is still heavily overloaded with argument shifting, this makes it a little more sane. Fixes #172
+ * Serialize expected and actual values only when test fails. Speeds up output of valid tests, especially for lots of large objects. Fixes #183
+ * Fix sourceFromsTacktrace to get the right line in Firefox. Shift the 'error' line away in Chrome to get a match.
+ * Fix references to test/deepEqual.js
+ * In autorun mode, moduleDone is called without matching moduleStart. Fix issue #184
+ * Fixture test: allow anything falsy in test as getAttribute in oldIE will return empty string instead of null. We don't really care.
+ * Keep label and checkbox together ( http://i.imgur.com/5Wk3A.png )
+ * Add readme for themes
+ * Fix bad global in reset()
+ * Some cleanup in theme addons
+ * Update headers
+ * Update nv.html, add gabe theme based on https://github.com/jquery/qunit/pull/188
+ * Experiemental custom theme based on https://github.com/jquery/qunit/pull/62 by NV
+ * Replace deprecated same and equals aliases with placeholders that just throw errors, providing a hint at what to use instead. Rename test file to match that.
+ * Can't rely on outerHTML for Firefox < 11. Use cloneNode instead.
+ * Merge remote branch 'conzett/master'
+ * Cleanup whitespace
+ * Update sessionStorage support test to latest version from Modernizr, trying to setItem to avoid QUOTA_EXCEEDED_EXCEPTION
+ * Change fixture reset behavior
+ * Merge pull request #181 from simonz/development
+ * Escaping test names
+ * Show exception stack when test failed
+
+1.2.0 / 2011-11-24
+==================
+
+ * remove uses of equals(), as it's deprecated in favor of equal()
+ * Code review of "Allow objects with no prototype to be tested against object literals."
+ * Allow objects with no prototype to tested against object literals.
+ * Fix IE8 "Member not found" error
+ * Using node-qunit port, the start/stop function are not exposed so we need to prefix any call to them with 'QUnit'. Aka: start() -> QUnit.start()
+ * Remove the 'let teardown clean up globals test' - IE<9 doesn't support (==buggy) deleting window properties, and that's not worth the trouble, as everything else passes just fine. Fixes #155
+ * Fix globals in test.js, part 2
+ * Fix globals in test.js. ?tell wwalser to use ?noglobals everyonce in a while
+ * Extend readme regarding release process
+
+1.1.0 / 2011-10-11
+==================
+
+ * Fixes #134 - Add a window.onerror handler. Makes uncaught errors actually fail the testsuite, instead of going by unnoticed.
+ * Whitespace cleanup
+ * Merge remote branch 'trevorparscal/master'
+ * Fixed IE compatibility issues with using toString on NodeList objects, which in some browsers results in [object Object] rather than [object NodeList]. Now using duck typing for NodeList objects based on the presence of length, length being a number, presence of item method (which will be typeof string in IE and function in others, so we just check that it's not undefined) and that item(0) returns the same value as [0], unless it's empty, in which case item(0) will return 0, while [0] would return undefined. Tested in IE6, IE8, Firefox 6, Safari 5 and Chrome 16.
+ * Update readme with basic notes on releases
+ * More whitespace/parens cleanup
+ * Check if setTimeout is available before trying to delay running the next task. Fixes #160
+ * Whitespace/formatting fix, remove unnecessary parens
+ * Use alias for Object.prototype.toString
+ * Merge remote branch 'trevorparscal/master'
+ * Merge remote branch 'wwalser/recursionBug'
+ * Default 'expected' to null in asyncTest(), same as in test() itself.
+ * Whitespace cleanup
+ * Merge remote branch 'mmchaney/master'
+ * Merge remote branch 'Krinkle/master'
+ * Using === instead of ==
+ * Added more strict array type detection for dump output, and allowed NodeList objects to be output as arrays
+ * Fixes a bug where after an async test, assertions could move between test cases because of internal state (config.current) being incorrectly set
+ * Simplified check for assertion count and adjusted whitespace
+ * Redo of fixing issue #156 (Support Object.prototype extending environment). * QUnit.diff: Throws exception without this if Object.prototype is set (Property 'length' of undefined. Since Object.prototype.foo doesn't have a property 'rows') * QUnit.url: Without this fix, if Object.prototype.foo is set, the url will be set to ?foo=...&the=rest. * saveGlobals: Without this fix, whenever a member is added to Object.prototype, saveGlobals will think it was a global variable in this loop. --- This time using the call method instead of obj.hasOwnProperty(key), which may fail if the object has that as it's own property (touché!).
+ * Handle expect(0) as expected, i.e. expect(0); ok(true, foo); will cause a test to fail
+
+1.0.0 / 2011-10-06
+==================
+
+ * Make QUnit work with TestSwarm
+ * Run other addons tests as composite addon demo. Need to move that to /test folder once this setup actually works
+ * Add-on: New assertion-type: step()
+ * added parameter to start and stop allowing a user to increment/decrement the semaphore more than once per call
+ * Update readmes with .md extension for GitHub to render them as markdown
+ * Update close-enough addon to include readme and match (new) naming convetions
+ * Merge remote branch 'righi/close-enough-addon'
+ * Canvas addon: Update file referneces
+ * Update canvas addon: Rename files and add README
+ * Merge remote branch 'wwalser/composite'
+ * Fix #142 - Backslash characters in messages should not be escaped
+ * Add module name to testStart and testDone callbacks
+ * Removed extra columns in object literals. Closes #153
+ * Remove dead links in comments.
+ * Merge remote branch 'wwalser/multipleCallbacks'
+ * Fixed syntax error and CommonJS incompatibilities in package.json
+ * Allow multiple callbacks to be registered.
+ * Add placeholder for when Safari may end up providing useful error handling
+ * changed file names to match addon naming convention
+ * Whitespace
+ * Created the composite addon.
+ * Using array and object literals.
+ * Issue #140: Make toggle system configurable.
+ * Merge remote branch 'tweetdeck/master'
+ * Adds the 'close enough' addon to determine if numbers are acceptably close enough in value.
+ * Fix recursion support in jsDump, along with tests. Fixes #63 and #100
+ * Adding a QUnit.config.altertitle flag which will allow users to opt-out of the functionality introduced in 60147ca0164e3d810b8a9bf46981c3d9cc569efc
+ * Refactor window.load handler into QUnit.load, makes it possible to call it manually.
+ * More whitespace cleanup
+ * Merge remote branch 'erikvold/one-chk-in-title'
+ * Whitespace
+ * Merge remote branch 'wwalser/syncStopCalls'
+ * Introducing the first QUnit addon, based on https://github.com/jquery/qunit/pull/84 - adds QUnit.pixelEqual assertion method, along with example tests.
+ * Remove config.hidepassed setting in test.js, wasn't intended to land in master.
+ * Expose QUnit.config.hidepassed setting. Overrides sessionStorage and enables enabling the feature programmatically. Fixes #133
+ * Fix formatting (css whitespace) for tracebacks.
+ * Expose extend, id, and addEvent methods.
+ * minor comment typo correction
+ * Ignore Eclipse WTP .settings
+ * Set 'The jQuery Project' as author in package.json
+ * Fixes a bug where synchronous calls to stop would cause tests to end before start was called again
+ * Point to planning testing wiki in readme
+ * only add one checkmark to the document.title
+ * Escape the stacktrace output before setting it as innerHTML, since it tends to contain `<` and `>` characters.
+ * Cleanup whitespace
+ * Run module.teardown before checking for pollution. Fixes #109 - noglobals should run after module teardown
+ * Fix accidental global variable "not"
+ * Update document.title status to use more robust unicode escape sequences, works even when served with non-utf-8-charset.
+ * Modify document.title when suite is done to show success/failure in tab, allows you to see the overall result without seeing the tab content.
+ * Merge pull request #107 from sexyprout/master
+ * Set a generic font
+ * Add/update headers
+ * Drop support for deprecated #main in favor of #qunit-fixture. If this breaks your testsuite, replace id="main" with id="qunit-fixture". Fixes #103
+ * Remove the same key as the one being set. Partial fix for #101
+ * Don't modify expected-count when checking pollution. The failing assertion isn't expected, so shouldn't be counted. And if expect wasn't used, the count is misleading.
+ * Fix order of noglobals check to produce correct introduced/delete error messages
+ * Prepend module name to sessionStorage keys to avoid conflicts
+ * Store filter-tests only when checked
+ * Write to sessionStorage only bad tests
+ * Moved QUnit.url() defintion after QUnit properties are merged into the global scope. Fixes #93 - QUnit url/extend function breaking urls in jQuery ajax test component
+ * Add a "Rerun" link to each test to replce the dblclick (still supported, for now).
+ * Fixed the regex for parsing the name of a test when double clicking to filter.
+ * Merge remote branch 'scottgonzalez/url'
+ * Added checkboxes to show which flags are currently on and allow toggling them.
+ * Retain all querystring parameters when filtering a test via double click.
+ * Added better querystring parsing. Now storing all querystring params in QUnit.urlParams so that we can carry the params forward when filtering to a specific test. This removes the ability to specify multiple filters.
+ * Make reordering optional (QUnit.config.reorder = false) and optimize "Hide passed tests" mode by also hiding "Running [testname]" entries.
+ * Added missing semicolons and wrapped undefined key in quotes.
+ * Optimize test hiding, add class on page load if stored in sessionStorage
+ * Optimize the hiding of passed tests.
+ * Position test results above test list, making it visible without ever having to scroll. Create a placeholder to avoid pushing down results later.
+ * Don't check for existing qunit-testresult element, it gets killed on init anyway.
+ * Added URL flag ?notrycatch (ala ?noglobals) for debugging exceptions. Won't try/catch test code, giving better debugging changes on the original exceptions. Fixes #72
+ * Always show quni-toolbar (if at all specified), persist checkbox via sessionStorage. Fixes #47
+ * Use non-html testname for calls to fail(). Fixes #77
+ * Overhaul of QUnit.callbacks. Consistent single argument with related properties, with additonal runtime property for QUnit.done
+ * Extended test/logs.html to capture more of the callbacks.
+ * Fixed moduleStart/Done callbacks. Added test/logs.html to test these callbacks. To be extended.
+ * Update copyright and license header. Fixes #61
+ * Formatting fix.
+ * Use a semaphore to synchronize stop() and start() calls. Fixes #76
+ * Merge branch 'master' of https://github.com/paulirish/qunit into paulirish-master
+ * Added two tests for previous QUnit.raises behaviour. For #69
+ * add optional 2. arg to QUnit.raises #69.
+ * fix references inside Complex Instances Nesting to what was originally intended.
+ * Qualify calls to ok() in raises() for compability with CLI enviroments.
+ * Fix done() handling, check for blocking, not block property
+ * Fix moduleStart/Done and done callbacks.
+ * Replacing sessionStorage test with the one from Modernizr/master (instead of current release). Here's hoping it'll work for some time.
+ * Updated test for availibility of sessionStorage, based on test from Modernizr. Fixes #64
+ * Defer test execution when previous run passed, persisted via sessionStorage. Fixes #49
+ * Refactored module handling and queuing to enable selective defer of test runs.
+ * Move assertions property from config to Test
+ * Move expected-tests property from config to Test
+ * Refactored test() method to delegate to a Test object to encapsulate all properties and methods of a single test, allowing further modifications.
+ * Adding output of sourcefile and linenumber of failed assertions (except ok()). Only limited cross-browser support for now. Fixes #60
+ * Drop 'hide missing tests' feature. Fixes #48
+ * Adding readme. Fixes #58
+ * Merge branch 'prettydiff'
+ * Improve jsDump output with formatted diffs.
+ * Cleanup whitespace
+ * Cleanup whitespace
+ * Added additional guards around browser specific code and cleaned up jsDump code
+ * Added guards around tests which are only for browsers
+ * cleaned up setTimeout undefined checking and double done on test finish
+ * fixing .gitignore
+ * making window setTimeout query more consistent
+ * Moved expect-code back to beginning of function, where it belongs. Fixes #52
+ * Bread crumb in header: Link to suite without filters, add link to current page based on the filter, if present. Fixes #50
+ * Make the toolbar element optional when checking for show/hide of test results. Fixes #46
+ * Adding headless.html to manually test logging and verify that QUnit works without output elements. Keeping #qunit-fixture as a few tests actually use that.
+ * Fix for QUnit.moduleDone, get rid of initial bogus log. Fixes #33
+ * Pass raw data (result, message, actual, expected) as third argument to QUnit.log. Fixes #32
+ * Dump full exception. Not pretty, but functional (see issue Pretty diff for pretty output). Fixes #31
+ * Don't let QUnit.reset() cause assertions to run. Manually applied from Scott Gonzalez branch. Fixes #34
+ * Added missing semicolons. Fixes #37
+ * Show okay/failed instead of undefined. Fixes #38
+ * Expose push as QUnit.push to build custom assertions. Fixes #39
+ * Respect filter pass selection when writing new results. Fixes #43
+ * Cleanup tests, removing asyncTest-undefined check and formatting
+ * Reset: Fall back to innerHTML when jQuery isn't available. Fixes #44
+ * Merge branch 'master' of github.com:jquery/qunit
+ * reset doesn't exist here - fixes #28.
+ * - less css cruft, better readability - replaced inline style for test counts with "counts" class - test counts now use a "failed"/"passed" vs "pass"/"fail", shorter/more distinct selectors - pulled all test counts styling together and up (they're always the same regardless of section pass/fail state)
+ * Adding .gitignore file
+ * Removing diff test - diffing works fine, as the browser collapses whitespace in its output, but the test can't do that and isn't worth fixing.
+ * Always synchronize the done-step (it'll set the timeout when necessary), fixes timing race conditions.
+ * Insert location.href as an anchor around the header. Fixes issue #29
+ * - kill double ;; in escapeHtml. oops
+ * Removed html escaping from QUnit.diff, as input is already escaped, only leads to double escaping. Replaced newlines with single whitespace.
+ * Optimized and cleaned up CSS file
+ * Making the reset-method non-global (only module, test and assertions should be global), and fixing the fixture reset by using jQuery's html() method again, doesn't work with innerHTML, yet
+ * Introducing #qunit-fixture element, deprecating the (never documented) #main element. Doesn't require inline styles and is now independent of jQuery.
+ * Ammending previous commit: Remove jQuery-core specific resets (will be replaced within jQuery testsuite). Fixes issue #19 - QUnit.reset() removes global jQuery ajax event handlers
+ * Remove jQuery-core specific resets (will be replaced within jQuery testsuite). Fixes issue #19 - QUnit.reset() removes global jQuery ajax event handlers
+ * Cleaning up rubble from the previous commit.
+ * Added raises assertion, reusing some of kennsnyder's code.
+ * Merged kensnyder's object detection code. Original message: Streamlined object detection and exposed QUnit.objectType as a function.
+ * Fixed some bad formatting.
+ * Move various QUnit properties below the globals-export to avoid init becoming a global method. Fixes issue #11 - Remove 'init' function from a global namespace
+ * Improved output when expected != actual: Output both only then, and add a diff. Fixes issue #10 - Show diff if equal() or deepEqual() failed
+ * Expand failed tests on load. Fixes issue #8 - Failed tests expanded on load
+ * Set location.search for url-filtering instead of location.href. Fixes issue #7 - Modify location.search instead of location.href on test double-click
+ * Add QUnit.begin() callback. Fixes issue #6 - Add 'start' callback.
+ * add css style for result (".test-actual") in passed tests
+ * Fixed output escaping by using leeoniya's custom escaping along with innerHTML. Also paves the way for outputting diffs.
+ * Cleanup
+ * Revert "Revert part of bad merge, back to using createTextNode"
+ * Revert part of bad merge, back to using createTextNode
+ * Fixed doubleclick-handler and filtering to rerun only a single test.
+ * Add ability to css style a test's messages, expected and actual results. Merged from Leon Sorokin (leeoniya).
+ * Remove space between module name and colon
+ * - removed "module" wording from reports (unneeded and cluttery) - added and modified css to make module & test names styleable
+ * Logging support for Each test can extend the module testEnvironment
+ * Fixing whitespace
+ * Update tests to use equal() and deepEqual() rather than the deprecated equals() and same()
+ * Consistent argument names for deepEqual
+ * Skip DOM part of jsDump test if using a SSJS environment without a DOM
+ * Improve async testing by creating the result element before running the test, updating it later. If the test fails, its clear which test is the culprit.
+ * Add autostart option to config. Set via QUnit.config.autostart = false; start later via QUnit.start()
+ * Expose QUnit.config, but don't make config a global
+ * Expose QUnit.config as global to make external workarounds easier
+ * Merge branch 'asyncsetup'
+ * Allowing async setup and teardown. Fixes http://github.com/jquery/qunit/issues#issue/20
+ * Always output expected and actual result (no reason not to). Fixes http://github.com/jquery/qunit/issues#issue/21
+ * More changes to the detection of types in jsDump's typeOf.
+ * Change the typeOf checks in QUnit to be more accurate.
+ * Added test for jsDump and modified its options to properly output results when document.createTextNode is used; currently tests for DOM elements cause a stackoverflow error in IEs, works fine, with the correct output, elsewhere
+ * Always use jsDump to output result objects into messages, making the output for passing assertions more useful
+ * Make it so that the display is updated, at least, once a second - also prevents scripts from executing for too long and causing problems.
+ * added tests and patch for qunit.equiv to avoid circular references in objects and arrays
+ * No reason to continue looping, we can stop at this point. Thanks to Chris Thatcher for the suggestion.
+ * Use createTextNode instead of innerHTML for showing test result since expected and actual might be something that looks like a tag.
+ * 'Test card' design added
+ * switched green to blue for top-level pass + reduced padding
+ * Bringing the QUnit API in line with the CommonJS API.
+ * Explicitly set list-style-position: inside on result LIs.
+ * Madness with border-radius.
+ * Corrected banner styles for new class names
+ * Added rounded corners and removed body rules for embedded tests
+ * Resolving merge conflicts.
+ * added colouring for value summary
+ * adding some extra text colours
+ * added styles for toolbar
+ * added new styles
+ * IE 6 and 7 weren't respecting the CSS rules for the banner, used a different technique instead.
+ * Went a bit further and made extra-sure that the target was specified correctly.
+ * Fixed problem where double-clicking an entry in IE caused an error to occur.
+ * Path for http://dev.jquery.com/ticket/5426 - fix the microformat test result
+ * Fixed test() to use 'expected' 2nd param
+ * Remove the named function expressions, to stop Safari 2 from freaking out. Fixes #5.
+ * Each test can extend the module testEnvironment
+ * Extra test for current test environment
+ * Make the current testEnvironment available to utility functions
+ * typeOf in QUnit.jsDump now uses QUnit.is
+ * hoozit in QUnit.equiv now uses QUnit.is
+ * Properly set label attributes.
+ * Some minor tweaks to RyanS' GETParams change.
+ * left a console.log in :(
+ * Took into account a fringe case when using qunit with testswarm. Trying to run all the tests with the extra url params from testswarm would make qunit look for a testsuite that did not exist
+ * need to set config.currentModule to have correct names and working filters
+ * Support logging of testEnvironment
+ * async tests aren't possible on rhino
+ * Fixed a missing QUnit.reset().
+ * The QUnit. prefix was missing from the uses of the start() method.
+ * Merged lifecycle object into testEnvironment
+ * "replacing totally wrong diff algorithm with a working one" Patch from kassens (manually applied).
+ * fixing jslint errors in test.js
+ * Fixed: testDone() was always called with 0 failures in CommonJS mode
+ * Fixed: moduleDone() was invoked on first call to module()
+ * Added a new asyncTest method - removes the need for having to call start() at the beginning of an asynchronous test.
+ * Added support for expected numbers in the test method.
+ * Fixed broken dynamic loading of tests (can now dynamically load tests and done still works properly).
+ * Simplified the logic for calling 'done' and pushing off new tests - was causing too many inconsistencies otherwise.
+ * Simplified the markup for the QUnit test test suite.
+ * Realized that it's really easy to handle the case where stop() has been called and then an exception is thrown.
+ * Added in better logging support. Now handle moduleStart/moduleDone and testStart/testDone. Also make sure that done only fires once at the end.
+ * Made it so that you can reset the suite to an initial state (at which point tests can be dynamically loaded and run, for example).
+ * Re-worked QUnit to handle dynamic loading of additional code (the 'done' code will be re-run after additional code is loaded).
+ * Removed the old SVN version stuff.
+ * Moved the QUnit source into a separate directory and updated the test suite/packages files.
+ * Added in CommonJS support for exporting the QUnit functionality.
+ * Missing quote from package.json.
+ * Fixed trailing comma in package.json.
+ * Added a CommonJS/Narwhal package.json file.
+ * Accidentally reverted the jsDump/equiv changes that had been made.
+ * Hide the filter toolbar if it's not needed. Also exposed the jsDump and equiv objects on QUnit.
+ * Retooled the QUnit CSS to be more generic.
+ * Renamed the QUnit files from testrunner/testsuite to QUnit.
+ * Expose QUnit.equiv and QUnit.jsDump in QUnit.
+ * Moved the QUnit test directory into the QUnit directory.
+ * Reworked the QUnit CSS (moved jQuery-specific stuff out, made all the other selectors more specific).
+ * Removed the #main reset for non-jQuery code (QUnit.reset can be overwritten with your own reset code).
+ * Moved the QUnit toolbar inline.
+ * Switched to using a qunit- prefix for special elements (banner, userAgent, and tests).
+ * Missed a case in QUnit where an element was assumed to exist.
+ * QUnit's isSet and isObj are no longer needed - you should use same instead.
+ * Make sure that QUnit's equiv entity escaping is enabled by default (otherwise the output gets kind of crazy).
+ * Refactored QUnit, completely reorganized the structure of the file. Additionally made it so that QUnit can run outside of a browser (inside Rhino, for example).
+ * Removed some legacy and jQuery-specific test methods.
+ * Added callbacks for tests and modules. It's now possible to reproduce the full display of the testrunner without using the regular rendering.
+ * QUnit no longer depends upon rendering the results (it can work simply by using the logging callbacks).
+ * Made QUnit no longer require jQuery (it is now a standalone, framework independent, test runner).
+ * Reverted the noglobals changed from QUnit - causing chaos in the jQuery test suite.
+ * qunit: removed noglobals flag, instead always check for globals after teardown; if a test has to introduce a global "myVar", use delete window.myVar in teardown or at the end of a test
+ * qunit: don't child selectors when IE should behave nicely, too
+ * qunit: improvment for the test-scope: create a new object and call setup, the test, and teardown in the scope of that object - allows you to provide test fixtures to each test without messing with global data; kudos to Martin Häcker for the contribution
+ * qunit: added missing semicolons
+ * qunit: fixed a semicolon, that should have been a comma
+ * QUnit: implemented error handling for Opera as proposed by #3628
+ * qunit: fix for http://dev.jquery.com/ticket/3215 changing wording of testresults, to something more positive (x of y passed, z failed)
+ * QUnit: testrunner.js: Ensures equality of types (String, Boolean, Number) declared with the 'new' prefix. See comments #3, #4 and #5 on http://philrathe.com/articles/equiv
+ * qunit: wrap name of test in span when a module is used for better styling
+ * qunit: auto-prepend default mark (#header, #banner, #userAgent, #tests) when not present
+ * Landing some changes to add logging to QUnit (so that it's easier to hook in to when a test finishes).
+ * Added checkbox for hiding missing tests (tests that fail with the text 'missing test - untested code is broken code')
+ * qunit: eol-style:native and mime-type
+ * HTML being injected for the test result wasn't valid HTML.
+ * qunit: setting mimetype for testsuite.css
+ * qunit: update to Ariel's noglobals patch to support async tests as well
+ * Landing Ariel's change - checks for global variable leakage.
+ * qunit: run module-teardown in its own synchronize block to synchronize with async tests (ugh)
+ * qunit: same: equiv - completely refactored in the testrunner.
+ * testrunner.js: - Update equiv to support Date and RegExp. - Change behavior when comparing function: - abort when in an instance of Object (when references comparison failed) - skip otherwise (like before)
+ * qunit: code refactoring and cleanup
+ * QUnit: update equiv to latest version, handling multiple arguments and NaN, see http://philrathe.com/articles/equiv
+ * QUnit: cleanup, deprecating compare, compare2 and serialArray: usage now throws an error with a helpful message
+ * QUnit: optional timeout argument for stop, while making tests undetermined, useful for debugging
+ * QUnit: added toolbar with "hide passed tests" checkbox to help focus on failed tests
+ * QUnit: minor output formatting
+ * QUnit: adding same-assertion for a recursive comparsion of primite values, arrays and objects, thanks to Philippe Rathé for the contribution, including tests
+ * QUnit: adding same-assertion for a recursive comparsion of primite values, arrays and objects, thanks to Philippe Rathé for the contribution, including tests
+ * QUnit: adding same-assertion for a recursive comparsion of primite values, arrays and objects, thanks to Philippe Rathé for the contribution, including tests
+ * qunit: use window.load to initialize tests, allowing other code to run on document-ready before starting to run tests
+ * qunit: allow either setup or teardown, instead of both or nothing
+ * qunit: make everything private by default, expose only public API; removed old timeout-option (non-deterministic, disabled for a long time anyway); use local $ reference instead of global jQuery reference; minor code cleanup (var config instead of _config; queue.shift instead of slice)
+ * qunit: added support for module level setup/teardown callbacks
+ * qunit: modified example for equals to avoid confusion with parameter ordering
+ * qunit: added id/classes to result element to enable integration with browser automation tools, see http://docs.jquery.com/QUnit#Integration_into_Browser_Automation_Tools
+ * qunit: replaced $ alias with jQuery (merged from jquery/test/data/testrunner.js)
+ * qunit: fixed inline documentation for equals
+ * qunit testrunner - catch and log possible error during reset()
+ * QUnit: Switched out Date and Rev for Id.
+ * qunit: when errors are thrown in a test, the message is successfully show on all browsers.
+ * qunit: added license header
+ * qunit: moved jquery testrunner to top-level project, see http://docs.jquery.com/QUnit
+ * Share project 'qunit' into 'https://jqueryjs.googlecode.com/svn'
diff --git a/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/README.md b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/README.md
new file mode 100644
index 00000000..57ff29e1
--- /dev/null
+++ b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/README.md
@@ -0,0 +1,59 @@
+[QUnit](http://qunitjs.com) - A JavaScript Unit Testing framework.
+================================
+
+QUnit is a powerful, easy-to-use, JavaScript test suite. It's used by the jQuery
+project to test its code and plugins but is capable of testing any generic
+JavaScript code (and even capable of testing JavaScript code on the server-side).
+
+QUnit is especially useful for regression testing: Whenever a bug is reported,
+write a test that asserts the existence of that particular bug. Then fix it and
+commit both. Every time you work on the code again, run the tests. If the bug
+comes up again - a regression - you'll spot it immediately and know how to fix
+it, because you know what code you just changed.
+
+Having good unit test coverage makes safe refactoring easy and cheap. You can
+run the tests after each small refactoring step and always know what change
+broke something.
+
+QUnit is similar to other unit testing frameworks like JUnit, but makes use of
+the features JavaScript provides and helps with testing code in the browser, e.g.
+with its stop/start facilities for testing asynchronous code.
+
+If you are interested in helping developing QUnit, you are in the right place.
+For related discussions, visit the
+[QUnit and Testing forum](http://forum.jquery.com/qunit-and-testing).
+
+Planning for a qunitjs.com site and other testing tools related work now happens
+on the [jQuery Testing Team planning wiki](http://jquerytesting.pbworks.com/w/page/41556026/FrontPage).
+
+Development
+-----------
+
+To submit patches, fork the repository, create a branch for the change. Then implement
+the change, run `grunt` to lint and test it, then commit, push and create a pull request.
+
+Include some background for the change in the commit message and `Fixes #nnn`, referring
+to the issue number you're addressing.
+
+To run `grunt`, you need `node` and `npm`, then `npm install grunt -g`. That gives you a global
+grunt binary. For additional grunt tasks, also run `npm install`.
+
+Releases
+--------
+
+Install git-extras and run `git changelog` to update History.md.
+Update qunit/qunit.js|css and package.json to the release version, commit and
+tag, update them again to the next version, commit and push commits and tags
+(`git push --tags origin master`).
+
+Put the 'v' in front of the tag, e.g. `v1.8.0`. Clean up the changelog, removing merge commits
+or whitespace cleanups.
+
+To upload to code.jquery.com (replace $version accordingly):
+
+ scp -q qunit/qunit.js jqadmin@code.origin.jquery.com:/var/www/html/code.jquery.com/qunit/qunit-$version.js
+ scp -q qunit/qunit.css jqadmin@code.origin.jquery.com:/var/www/html/code.jquery.com/qunit/qunit-$version.css
+
+Then update /var/www/html/code.jquery.com/index.html and purge it with:
+
+ curl -s http://code.origin.jquery.com/?reload \ No newline at end of file
diff --git a/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/canvas/README.md b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/canvas/README.md
new file mode 100644
index 00000000..7c0f3663
--- /dev/null
+++ b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/canvas/README.md
@@ -0,0 +1,16 @@
+Canvas - A QUnit Addon For Testing Canvas Rendering
+================================
+
+This addon for QUnit adds a pixelEqual method that allows you to assert
+individual pixel values in a given canvas.
+
+Usage:
+
+ pixelEqual(canvas, x, y, r, g, b, a, message)
+
+Where:
+
+ * canvas: Reference to a canvas element
+ * x, y: Coordinates of the pixel to test
+ * r, g, b, a: The color and opacity value of the pixel that you except
+ * message: Optional message, same as for other assertions
diff --git a/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/canvas/canvas-test.js b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/canvas/canvas-test.js
new file mode 100644
index 00000000..72ad66f4
--- /dev/null
+++ b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/canvas/canvas-test.js
@@ -0,0 +1,76 @@
+test("Canvas pixels", function () {
+ var canvas = document.getElementById('qunit-canvas'), context;
+ try {
+ context = canvas.getContext('2d');
+ } catch(e) {
+ // propably no canvas support, just exit
+ return;
+ }
+ context.fillStyle = 'rgba(0, 0, 0, 0)';
+ context.fillRect(0, 0, 5, 5);
+ QUnit.pixelEqual(canvas, 0, 0, 0, 0, 0, 0);
+ context.clearRect(0,0,5,5);
+ context.fillStyle = 'rgba(255, 0, 0, 0)';
+ context.fillRect(0, 0, 5, 5);
+ QUnit.pixelEqual(canvas, 0, 0, 0, 0, 0, 0);
+ context.clearRect(0,0,5,5);
+ context.fillStyle = 'rgba(0, 255, 0, 0)';
+ context.fillRect(0, 0, 5, 5);
+ QUnit.pixelEqual(canvas, 0, 0, 0, 0, 0, 0);
+ context.clearRect(0,0,5,5);
+ context.fillStyle = 'rgba(0, 0, 255, 0)';
+ context.fillRect(0, 0, 5, 5);
+ QUnit.pixelEqual(canvas, 0, 0, 0, 0, 0, 0);
+ context.clearRect(0,0,5,5);
+
+ context.fillStyle = 'rgba(0, 0, 0, 0.5)';
+ context.fillRect(0, 0, 5, 5);
+ QUnit.pixelEqual(canvas, 0, 0, 0, 0, 0, 127);
+ context.clearRect(0,0,5,5);
+ context.fillStyle = 'rgba(255, 0, 0, 0.5)';
+ context.fillRect(0, 0, 5, 5);
+ QUnit.pixelEqual(canvas, 0, 0, 255, 0, 0, 127);
+ context.clearRect(0,0,5,5);
+ context.fillStyle = 'rgba(0, 255, 0, 0.5)';
+ context.fillRect(0, 0, 5, 5);
+ QUnit.pixelEqual(canvas, 0, 0, 0, 255, 0, 127);
+ context.clearRect(0,0,5,5);
+ context.fillStyle = 'rgba(0, 0, 255, 0.5)';
+ context.fillRect(0, 0, 5, 5);
+ QUnit.pixelEqual(canvas, 0, 0, 0, 0, 255, 127);
+ context.clearRect(0,0,5,5);
+
+ context.fillStyle = 'rgba(0, 0, 0, 0.5)';
+ context.fillRect(0, 0, 5, 5);
+ QUnit.pixelEqual(canvas, 2, 2, 0, 0, 0, 127);
+ context.clearRect(0,0,5,5);
+ context.fillStyle = 'rgba(255, 0, 0, 0.5)';
+ context.fillRect(0, 0, 5, 5);
+ QUnit.pixelEqual(canvas, 2, 2, 255, 0, 0, 127);
+ context.clearRect(0,0,5,5);
+ context.fillStyle = 'rgba(0, 255, 0, 0.5)';
+ context.fillRect(0, 0, 5, 5);
+ QUnit.pixelEqual(canvas, 2, 2, 0, 255, 0, 127);
+ context.clearRect(0,0,5,5);
+ context.fillStyle = 'rgba(0, 0, 255, 0.5)';
+ context.fillRect(0, 0, 5, 5);
+ QUnit.pixelEqual(canvas, 2, 2, 0, 0, 255, 127);
+ context.clearRect(0,0,5,5);
+
+ context.fillStyle = 'rgba(0, 0, 0, 1)';
+ context.fillRect(0, 0, 5, 5);
+ QUnit.pixelEqual(canvas, 4, 4, 0, 0, 0, 255);
+ context.clearRect(0,0,5,5);
+ context.fillStyle = 'rgba(255, 0, 0, 1)';
+ context.fillRect(0, 0, 5, 5);
+ QUnit.pixelEqual(canvas, 4, 4, 255, 0, 0, 255);
+ context.clearRect(0,0,5,5);
+ context.fillStyle = 'rgba(0, 255, 0, 1)';
+ context.fillRect(0, 0, 5, 5);
+ QUnit.pixelEqual(canvas, 4, 4, 0, 255, 0, 255);
+ context.clearRect(0,0,5,5);
+ context.fillStyle = 'rgba(0, 0, 255, 1)';
+ context.fillRect(0, 0, 5, 5);
+ QUnit.pixelEqual(canvas, 4, 4, 0, 0, 255, 255);
+ context.clearRect(0,0,5,5);
+});
diff --git a/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/canvas/canvas.html b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/canvas/canvas.html
new file mode 100644
index 00000000..5d253b8c
--- /dev/null
+++ b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/canvas/canvas.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="UTF-8" />
+ <title>QUnit Test Suite - Canvas Addon</title>
+ <link rel="stylesheet" href="../../qunit/qunit.css" type="text/css" media="screen">
+ <script type="text/javascript" src="../../qunit/qunit.js"></script>
+ <script type="text/javascript" src="qunit-canvas.js"></script>
+ <script type="text/javascript" src="canvas-test.js"></script>
+</head>
+<body>
+ <div id="qunit"></div>
+ <canvas id="qunit-canvas" width="5" height="5"></canvas>
+</body>
+</html>
diff --git a/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/canvas/qunit-canvas.js b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/canvas/qunit-canvas.js
new file mode 100644
index 00000000..bc26c4ca
--- /dev/null
+++ b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/canvas/qunit-canvas.js
@@ -0,0 +1,6 @@
+QUnit.extend( QUnit, {
+ pixelEqual: function(canvas, x, y, r, g, b, a, message) {
+ var actual = Array.prototype.slice.apply(canvas.getContext('2d').getImageData(x, y, 1, 1).data), expected = [r, g, b, a];
+ QUnit.push(QUnit.equiv(actual, expected), actual, expected, message);
+ }
+});
diff --git a/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/close-enough/README.md b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/close-enough/README.md
new file mode 100644
index 00000000..d490b250
--- /dev/null
+++ b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/close-enough/README.md
@@ -0,0 +1,17 @@
+Close-Enough - A QUnit Addon For Number Approximations
+================================
+
+This addon for QUnit adds close and notClose assertion methods, to test that
+numbers are close enough (or different enough) from an expected number, with
+a specified accuracy.
+
+Usage:
+
+ close(actual, expected, maxDifference, message)
+ notClose(actual, expected, minDifference, message)
+
+Where:
+
+ * maxDifference: the maximum inclusive difference allowed between the actual and expected numbers
+ * minDifference: the minimum exclusive difference allowed between the actual and expected numbers
+ * actual, expected, message: The usual
diff --git a/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/close-enough/close-enough-test.js b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/close-enough/close-enough-test.js
new file mode 100644
index 00000000..fc6a9a82
--- /dev/null
+++ b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/close-enough/close-enough-test.js
@@ -0,0 +1,35 @@
+test("Close Numbers", function () {
+ var halfPi = Math.PI / 2,
+ sqrt2 = Math.sqrt(2);
+
+ QUnit.close(7, 7, 0);
+ QUnit.close(7, 7.1, 0.1);
+ QUnit.close(7, 7.1, 0.2);
+
+ QUnit.close(3.141, Math.PI, 0.001);
+ QUnit.close(3.1, Math.PI, 0.1);
+
+ QUnit.close(halfPi, 1.57, 0.001);
+
+ QUnit.close(sqrt2, 1.4142, 0.0001);
+
+ QUnit.close(Infinity, Infinity, 1);
+});
+
+test("Distant Numbers", function () {
+ var halfPi = Math.PI / 2,
+ sqrt2 = Math.sqrt(2);
+
+ QUnit.notClose(6, 7, 0);
+ QUnit.notClose(7, 7.2, 0.1);
+ QUnit.notClose(7, 7.2, 0.19999999999);
+
+ QUnit.notClose(3.141, Math.PI, 0.0001);
+ QUnit.notClose(3.1, Math.PI, 0.001);
+
+ QUnit.notClose(halfPi, 1.57, 0.0001);
+
+ QUnit.notClose(sqrt2, 1.4142, 0.00001);
+
+ QUnit.notClose(Infinity, -Infinity, 5);
+}); \ No newline at end of file
diff --git a/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/close-enough/close-enough.html b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/close-enough/close-enough.html
new file mode 100644
index 00000000..f5683201
--- /dev/null
+++ b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/close-enough/close-enough.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="UTF-8" />
+ <title>QUnit Test Suite - Close Enough Addon</title>
+ <link rel="stylesheet" href="../../qunit/qunit.css" type="text/css" media="screen">
+ <script type="text/javascript" src="../../qunit/qunit.js"></script>
+ <script type="text/javascript" src="qunit-close-enough.js"></script>
+ <script type="text/javascript" src="close-enough-test.js"></script>
+</head>
+<body>
+ <div id="qunit"></div>
+</body>
+</html>
diff --git a/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/close-enough/qunit-close-enough.js b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/close-enough/qunit-close-enough.js
new file mode 100644
index 00000000..ddb5a584
--- /dev/null
+++ b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/close-enough/qunit-close-enough.js
@@ -0,0 +1,32 @@
+QUnit.extend( QUnit, {
+ /**
+ * Checks that the first two arguments are equal, or are numbers close enough to be considered equal
+ * based on a specified maximum allowable difference.
+ *
+ * @example close(3.141, Math.PI, 0.001);
+ *
+ * @param Number actual
+ * @param Number expected
+ * @param Number maxDifference (the maximum inclusive difference allowed between the actual and expected numbers)
+ * @param String message (optional)
+ */
+ close: function(actual, expected, maxDifference, message) {
+ var passes = (actual === expected) || Math.abs(actual - expected) <= maxDifference;
+ QUnit.push(passes, actual, expected, message);
+ },
+
+ /**
+ * Checks that the first two arguments are numbers with differences greater than the specified
+ * minimum difference.
+ *
+ * @example notClose(3.1, Math.PI, 0.001);
+ *
+ * @param Number actual
+ * @param Number expected
+ * @param Number minDifference (the minimum exclusive difference allowed between the actual and expected numbers)
+ * @param String message (optional)
+ */
+ notClose: function(actual, expected, minDifference, message) {
+ QUnit.push(Math.abs(actual - expected) > minDifference, actual, expected, message);
+ }
+}); \ No newline at end of file
diff --git a/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/composite/README.md b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/composite/README.md
new file mode 100644
index 00000000..2e2d2fd7
--- /dev/null
+++ b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/composite/README.md
@@ -0,0 +1,12 @@
+Composite - A QUnit Addon For Running Multiple Test Files
+================================
+
+Composite is a QUnit addon that, when handed an array of files, will
+open each of those files inside of an iframe, run the tests and
+display the results as a single suite of QUnit tests.
+
+The Rerun link next to each suite allows you to quickly rerun that suite,
+outside the composite runner.
+
+If you want to see what assertion failed in a long list of assertions,
+just use the regular "Hide passed tests" checkbox. \ No newline at end of file
diff --git a/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/composite/composite-demo-test.html b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/composite/composite-demo-test.html
new file mode 100644
index 00000000..ad964c9d
--- /dev/null
+++ b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/composite/composite-demo-test.html
@@ -0,0 +1,26 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <title>QUnit SubsuiteRunner Test Suite</title>
+
+ <link rel="stylesheet" href="../../qunit/qunit.css" type="text/css" media="screen">
+ <link rel="stylesheet" href="qunit-composite.css">
+ <script src="../../qunit/qunit.js"></script>
+ <script src="qunit-composite.js"></script>
+
+ <script>
+ QUnit.testSuites([
+ "../../test/index.html",
+ "../canvas/canvas.html",
+ "../close-enough/close-enough.html",
+ "../step/step.html"
+ ]);
+ </script>
+</head>
+<body>
+ <div id="qunit"></div>
+ <div id="qunit-fixture">
+</div>
+</body>
+</html>
diff --git a/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/composite/index.html b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/composite/index.html
new file mode 100644
index 00000000..b08f5e97
--- /dev/null
+++ b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/composite/index.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="UTF-8" />
+ <title>Composite</title>
+ </head>
+ <body>
+ <h1>Composite</h1>
+ <h3>A QUnit Addon For Running Multiple Test Files</h3>
+ <p>Composite is a QUnit addon that, when handed an array of
+ files, will open each of those files inside of an iframe, run
+ the tests and display the results as a single suite of QUnit
+ tests.</p>
+ <h4>Using Composite</h4>
+ <p>To use Composite, setup a standard QUnit html page as you
+ would with other QUnit tests. Remember to include composite.js
+ and composite.css. Then, inside of either an external js file,
+ or a script block call the only new method that Composite
+ exposes, QUnit.testSuites().</p><p>QUnit.testSuites() is
+ passed an array of test files to run as follows:</p>
+ <pre>
+QUnit.testSuites([
+ "test-file-1.html",
+ "test-file-2.html",
+ "test-file-3.html"
+]);
+ </pre>
+ <h4>Tests</h4>
+ <p>
+ <a href="composite-demo-test.html">Composite Demo</a>: A suite which demoes how Composite is bootstrapped and run.
+ </p>
+ </body>
+</html>
diff --git a/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/composite/qunit-composite.css b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/composite/qunit-composite.css
new file mode 100644
index 00000000..df47362d
--- /dev/null
+++ b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/composite/qunit-composite.css
@@ -0,0 +1,13 @@
+iframe.qunit-subsuite{
+ position: fixed;
+ bottom: 0;
+ left: 0;
+
+ margin: 0;
+ padding: 0;
+ border-width: 1px 0 0;
+ height: 45%;
+ width: 100%;
+
+ background: #fff;
+} \ No newline at end of file
diff --git a/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/composite/qunit-composite.js b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/composite/qunit-composite.js
new file mode 100644
index 00000000..89c47eb2
--- /dev/null
+++ b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/composite/qunit-composite.js
@@ -0,0 +1,102 @@
+(function( QUnit ) {
+
+QUnit.extend( QUnit, {
+ testSuites: function( suites ) {
+ QUnit.begin(function() {
+ QUnit.initIframe();
+ });
+
+ for ( var i = 0; i < suites.length; i++ ) {
+ QUnit.runSuite( suites[i] );
+ }
+
+ QUnit.done(function() {
+ this.iframe.style.display = "none";
+ });
+ },
+
+ runSuite: function( suite ) {
+ asyncTest( suite, function() {
+ QUnit.iframe.setAttribute( "src", suite );
+ });
+ },
+
+ initIframe: function() {
+ var body = document.body,
+ iframe = this.iframe = document.createElement( "iframe" ),
+ iframeWin;
+
+ iframe.className = "qunit-subsuite";
+ body.appendChild( iframe );
+
+ function onIframeLoad() {
+ var module, test,
+ count = 0;
+
+
+ iframeWin.QUnit.moduleStart(function( data ) {
+ // capture module name for messages
+ module = data.name;
+ });
+
+ iframeWin.QUnit.testStart(function( data ) {
+ // capture test name for messages
+ test = data.name;
+ });
+ iframeWin.QUnit.testDone(function() {
+ test = null;
+ });
+
+ iframeWin.QUnit.log(function( data ) {
+ if (test === null) {
+ return;
+ }
+ // pass all test details through to the main page
+ var message = module + ": " + test + ": " + data.message;
+ expect( ++count );
+ QUnit.push( data.result, data.actual, data.expected, message );
+ });
+
+ iframeWin.QUnit.done(function() {
+ // start the wrapper test from the main page
+ start();
+ });
+ }
+ QUnit.addEvent( iframe, "load", onIframeLoad );
+
+ iframeWin = iframe.contentWindow;
+ }
+});
+
+QUnit.testStart(function( data ) {
+ // update the test status to show which test suite is running
+ QUnit.id( "qunit-testresult" ).innerHTML = "Running " + data.name + "...<br>&nbsp;";
+});
+
+QUnit.testDone(function() {
+ var i,
+ current = QUnit.id( this.config.current.id ),
+ children = current.children,
+ src = this.iframe.src;
+
+ // undo the auto-expansion of failed tests
+ for ( i = 0; i < children.length; i++ ) {
+ if ( children[i].nodeName === "OL" ) {
+ children[i].style.display = "none";
+ }
+ }
+
+ QUnit.addEvent(current, "dblclick", function( e ) {
+ var target = e && e.target ? e.target : window.event.srcElement;
+ if ( target.nodeName.toLowerCase() === "span" || target.nodeName.toLowerCase() === "b" ) {
+ target = target.parentNode;
+ }
+ if ( window.location && target.nodeName.toLowerCase() === "strong" ) {
+ window.location = src;
+ }
+ });
+
+ current.getElementsByTagName('a')[0].href = src;
+});
+
+}( QUnit ) );
diff --git a/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/junitlogger/index.html b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/junitlogger/index.html
new file mode 100644
index 00000000..fe78af37
--- /dev/null
+++ b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/junitlogger/index.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8" />
+<title>QUnit Test Suite - JUnit report</title>
+<link rel="stylesheet" href="../../qunit/qunit.css" type="text/css" media="screen">
+<script type="text/javascript" src="../../qunit/qunit.js"></script>
+<script type="text/javascript" src="junitlogger.js"></script>
+<script type="text/javascript">
+QUnit.jUnitReport = function(data) {
+ console.log(data.xml);
+};
+
+module('Module 1');
+
+test("test 1", 2, function () {
+ equal(1, 1, "Assert 1 = 1");
+ equal(1, 2, "Assert fail 1 = 2");
+});
+
+test("test 2", 3, function () {
+ equal(1, 1, "Assert 1 = 1");
+ equal(1, 2, "Assert fail 1 = 2");
+ equal(1, 1, "Assert 1 = 1");
+});
+
+module('Module 2');
+
+test("test 3", 2, function () {
+ equal(1, 1, "Assert 1 = 1");
+ equal(1, 2, "Assert fail 1 = 2");
+});
+
+test("test 4", 3, function () {
+ equal(1, 1, "Assert 1 = 1");
+ equal(1, 2, "Assert fail 1 = 2");
+ equal(1, 3, "Assert fail 1 = 3");
+});
+</script>
+</head>
+<body>
+ <div id="qunit"></div>
+</body>
+</html>
diff --git a/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/junitlogger/junitlogger.js b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/junitlogger/junitlogger.js
new file mode 100644
index 00000000..dde47079
--- /dev/null
+++ b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/junitlogger/junitlogger.js
@@ -0,0 +1,268 @@
+(function() {
+ var count = 0, suiteCount = 0, currentSuite, currentTest, suites = [], assertCount, start, results = {failed:0, passed:0, total:0, time:0};
+
+ QUnit.jUnitReport = function(data) {
+ // Gets called when a report is generated
+ };
+
+ QUnit.moduleStart(function(data) {
+ currentSuite = {
+ name: data.name,
+ tests: [],
+ failures: 0,
+ time: 0,
+ stdout : '',
+ stderr : ''
+ };
+
+ suites.push(currentSuite);
+ });
+
+ QUnit.moduleDone(function(data) {
+ });
+
+ QUnit.testStart(function(data) {
+ if(!start){ start = new Date(); }
+
+ assertCount = 0;
+
+ currentTest = {
+ name: data.name,
+ failures: [],
+ start: new Date()
+ };
+
+ // Setup default suite if no module was specified
+ if (!currentSuite) {
+ currentSuite = {
+ name: "default",
+ tests: [],
+ failures: 0,
+ time: 0,
+ stdout : '',
+ stderr : ''
+ };
+
+ suites.push(currentSuite);
+ }
+
+ currentSuite.tests.push(currentTest);
+ });
+
+ QUnit.testDone(function(data) {
+ currentTest.failed = data.failed;
+ currentTest.total = data.total;
+ currentSuite.failures += data.failed;
+
+ results.failed += data.failed;
+ results.passed += data.passed;
+ results.total += data.total;
+ });
+
+ QUnit.log(function(data) {
+ assertCount++;
+
+ if (!data.result) {
+ currentTest.failures.push(data.message);
+
+ // Add log message of failure to make it easier to find in jenkins UI
+ currentSuite.stdout += '[' + currentSuite.name + ', ' + currentTest.name + ', ' + assertCount + '] ' + data.message + '\n';
+ }
+ });
+
+ QUnit.done(function(data) {
+ function ISODateString(d) {
+ function pad(n) {
+ return n < 10 ? '0' + n : n;
+ }
+
+ return d.getUTCFullYear() + '-' +
+ pad(d.getUTCMonth() + 1)+'-' +
+ pad(d.getUTCDate()) + 'T' +
+ pad(d.getUTCHours()) + ':' +
+ pad(d.getUTCMinutes()) + ':' +
+ pad(d.getUTCSeconds()) + 'Z';
+ }
+
+ // Generate XML report
+ var i, ti, fi, test, suite,
+ xmlWriter = new XmlWriter({
+ linebreak_at : "testsuites,testsuite,testcase,failure,system-out,system-err"
+ }),
+ now = new Date();
+
+ xmlWriter.start('testsuites');
+
+ for (i = 0; i < suites.length; i++) {
+ suite = suites[i];
+
+ // Calculate time
+ for (ti = 0; ti < suite.tests.length; ti++) {
+ test = suite.tests[ti];
+
+ test.time = (now.getTime() - test.start.getTime()) / 1000;
+ suite.time += test.time;
+ }
+
+ xmlWriter.start('testsuite', {
+ id: "" + i,
+ name: suite.name,
+ errors: "0",
+ failures: suite.failures,
+ hostname: "localhost",
+ tests: suite.tests.length,
+ time: Math.round(suite.time * 1000) / 1000,
+ timestamp: ISODateString(now)
+ });
+
+ for (ti = 0; ti < suite.tests.length; ti++) {
+ test = suite.tests[ti];
+
+ xmlWriter.start('testcase', {
+ name: test.name,
+ total: test.total,
+ failed: test.failed,
+ time: Math.round(test.time * 1000) / 1000
+ });
+
+ for (fi = 0; fi < test.failures.length; fi++) {
+ xmlWriter.start('failure', {type: "AssertionFailedError", message: test.failures[fi]}, true);
+ }
+
+ xmlWriter.end('testcase');
+ }
+
+ if (suite.stdout) {
+ xmlWriter.start('system-out');
+ xmlWriter.cdata('\n' + suite.stdout);
+ xmlWriter.end('system-out');
+ }
+
+ if (suite.stderr) {
+ xmlWriter.start('system-err');
+ xmlWriter.cdata('\n' + suite.stderr);
+ xmlWriter.end('system-err');
+ }
+
+ xmlWriter.end('testsuite');
+ }
+
+ xmlWriter.end('testsuites');
+
+ results.time = new Date() - start;
+
+ QUnit.jUnitReport({
+ results:results,
+ xml: xmlWriter.getString()
+ });
+ });
+
+ function XmlWriter(settings) {
+ function addLineBreak(name) {
+ if (lineBreakAt[name] && data[data.length - 1] !== '\n') {
+ data.push('\n');
+ }
+ }
+
+ function makeMap(items, delim, map) {
+ var i;
+
+ items = items || [];
+
+ if (typeof(items) === "string") {
+ items = items.split(',');
+ }
+
+ map = map || {};
+
+ i = items.length;
+ while (i--) {
+ map[items[i]] = {};
+ }
+
+ return map;
+ }
+
+ function encode(text) {
+ var baseEntities = {
+ '"' : '&quot;',
+ "'" : '&apos;',
+ '<' : '&lt;',
+ '>' : '&gt;',
+ '&' : '&amp;'
+ };
+
+ return ('' + text).replace(/[<>&\"\']/g, function(chr) {
+ return baseEntities[chr] || chr;
+ });
+ }
+
+ var data = [], stack = [], lineBreakAt;
+
+ settings = settings || {};
+ lineBreakAt = makeMap(settings.linebreak_at || 'mytag');
+
+ this.start = function(name, attrs, empty) {
+ if (!empty) {
+ stack.push(name);
+ }
+
+ data.push('<', name);
+
+ for (var aname in attrs) {
+ data.push(" " + encode(aname), '="', encode(attrs[aname]), '"');
+ }
+
+ data.push(empty ? ' />' : '>');
+ addLineBreak(name);
+ };
+
+ this.end = function(name) {
+ stack.pop();
+ addLineBreak(name);
+ data.push('</', name, '>');
+ addLineBreak(name);
+ };
+
+ this.text = function(text) {
+ data.push(encode(text));
+ };
+
+ this.cdata = function(text) {
+ data.push('<![CDATA[', text, ']]>');
+ };
+
+ this.comment = function(text) {
+ data.push('<!--', text, '-->');
+ };
+
+ this.pi = function(name, text) {
+ if (text) {
+ data.push('<?', name, ' ', text, '?>\n');
+ } else {
+ data.push('<?', name, '?>\n');
+ }
+ };
+
+ this.doctype = function(text) {
+ data.push('<!DOCTYPE', text, '>\n');
+ };
+
+ this.getString = function() {
+ for (var i = stack.length - 1; i >= 0; i--) {
+ this.end(stack[i]);
+ }
+
+ stack = [];
+
+ return data.join('').replace(/\n$/, '');
+ };
+
+ this.reset = function() {
+ data = [];
+ stack = [];
+ };
+
+ this.pi(settings.xmldecl || 'xml version="1.0" encoding="UTF-8"');
+ }
+})(); \ No newline at end of file
diff --git a/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/phantomjs/README.md b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/phantomjs/README.md
new file mode 100644
index 00000000..ed6a4467
--- /dev/null
+++ b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/phantomjs/README.md
@@ -0,0 +1,14 @@
+PhantomJS Runner
+================
+
+A runner for PhantomJS, providing console output for tests.
+
+Usage:
+
+ phantomjs runner.js url
+
+Example:
+
+ phantomjs runner.js http://localhost/qunit/test
+
+If you're using Grunt, you should take a look at its [qunit task](https://github.com/cowboy/grunt/blob/master/docs/task_qunit.md). \ No newline at end of file
diff --git a/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/phantomjs/runner.js b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/phantomjs/runner.js
new file mode 100644
index 00000000..fdc82428
--- /dev/null
+++ b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/phantomjs/runner.js
@@ -0,0 +1,97 @@
+/*
+ * Qt+WebKit powered headless test runner using Phantomjs
+ *
+ * Phantomjs installation: http://code.google.com/p/phantomjs/wiki/BuildInstructions
+ *
+ * Run with:
+ * phantomjs runner.js [url-of-your-qunit-testsuite]
+ *
+ * E.g.
+ * phantomjs runner.js http://localhost/qunit/test
+ */
+
+var url = phantom.args[0];
+
+var page = require('webpage').create();
+
+// Route "console.log()" calls from within the Page context to the main Phantom context (i.e. current "this")
+page.onConsoleMessage = function(msg) {
+ console.log(msg);
+};
+
+page.onInitialized = function() {
+ page.evaluate(addLogging);
+};
+page.open(url, function(status){
+ if (status !== "success") {
+ console.log("Unable to access network: " + status);
+ phantom.exit(1);
+ } else {
+ // page.evaluate(addLogging);
+ var interval = setInterval(function() {
+ if (finished()) {
+ clearInterval(interval);
+ onfinishedTests();
+ }
+ }, 500);
+ }
+});
+
+function finished() {
+ return page.evaluate(function(){
+ return !!window.qunitDone;
+ });
+}
+
+function onfinishedTests() {
+ var output = page.evaluate(function() {
+ return JSON.stringify(window.qunitDone);
+ });
+ phantom.exit(JSON.parse(output).failed > 0 ? 1 : 0);
+}
+
+function addLogging() {
+ window.document.addEventListener( "DOMContentLoaded", function() {
+ var current_test_assertions = [];
+
+ QUnit.testDone(function(result) {
+ var name = result.module + ': ' + result.name;
+ var i;
+
+ if (result.failed) {
+ console.log('Assertion Failed: ' + name);
+
+ for (i = 0; i < current_test_assertions.length; i++) {
+ console.log(' ' + current_test_assertions[i]);
+ }
+ }
+
+ current_test_assertions = [];
+ });
+
+ QUnit.log(function(details) {
+ var response;
+
+ if (details.result) {
+ return;
+ }
+
+ response = details.message || '';
+
+ if (typeof details.expected !== 'undefined') {
+ if (response) {
+ response += ', ';
+ }
+
+ response += 'expected: ' + details.expected + ', but was: ' + details.actual;
+ }
+
+ current_test_assertions.push('Failed assertion: ' + response);
+ });
+
+ QUnit.done(function(result){
+ console.log('Took ' + result.runtime + 'ms to run ' + result.total + ' tests. ' + result.passed + ' passed, ' + result.failed + ' failed.');
+ window.qunitDone = result;
+ });
+ }, false );
+}
diff --git a/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/step/README.md b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/step/README.md
new file mode 100644
index 00000000..37af9df6
--- /dev/null
+++ b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/step/README.md
@@ -0,0 +1,18 @@
+QUnit.step() - A QUnit Addon For Testing execution in order
+============================================================
+
+This addon for QUnit adds a step method that allows you to assert
+the proper sequence in which the code should execute.
+
+Example:
+
+ test("example test", function () {
+ function x() {
+ QUnit.step(2, "function y should be called first");
+ }
+ function y() {
+ QUnit.step(1);
+ }
+ y();
+ x();
+ }); \ No newline at end of file
diff --git a/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/step/qunit-step.js b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/step/qunit-step.js
new file mode 100644
index 00000000..1ed3ff06
--- /dev/null
+++ b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/step/qunit-step.js
@@ -0,0 +1,25 @@
+QUnit.extend( QUnit, {
+
+ /**
+ * Check the sequence/order
+ *
+ * @example step(1); setTimeout(function () { step(3); }, 100); step(2);
+ * @param Number expected The excepted step within the test()
+ * @param String message (optional)
+ */
+ step: function (expected, message) {
+ this.config.current.step++; // increment internal step counter.
+ if (typeof message === "undefined") {
+ message = "step " + expected;
+ }
+ var actual = this.config.current.step;
+ QUnit.push(QUnit.equiv(actual, expected), actual, expected, message);
+ }
+});
+
+/**
+ * Reset the step counter for every test()
+ */
+QUnit.testStart(function () {
+ this.config.current.step = 0;
+});
diff --git a/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/step/step-test.js b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/step/step-test.js
new file mode 100644
index 00000000..a78c534b
--- /dev/null
+++ b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/step/step-test.js
@@ -0,0 +1,13 @@
+module('Step Addon');
+test("step", 3, function () {
+ QUnit.step(1, "step starts at 1");
+ setTimeout(function () {
+ start();
+ QUnit.step(3);
+ }, 100);
+ QUnit.step(2, "before the setTimeout callback is run");
+ stop();
+});
+test("step counter", 1, function () {
+ QUnit.step(1, "each test has its own step counter");
+}); \ No newline at end of file
diff --git a/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/step/step.html b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/step/step.html
new file mode 100644
index 00000000..95ba492d
--- /dev/null
+++ b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/step/step.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="UTF-8" />
+ <title>QUnit Test Suite - Step Addon</title>
+ <link rel="stylesheet" href="../../qunit/qunit.css" type="text/css" media="screen">
+ <script type="text/javascript" src="../../qunit/qunit.js"></script>
+ <script type="text/javascript" src="qunit-step.js"></script>
+ <script type="text/javascript" src="step-test.js"></script>
+</head>
+<body>
+ <div id="qunit"></div>
+</body>
+</html>
diff --git a/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/themes/README.md b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/themes/README.md
new file mode 100644
index 00000000..8bc1862c
--- /dev/null
+++ b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/themes/README.md
@@ -0,0 +1,6 @@
+Themes
+======
+
+These custom themes fully replace the default qunit.css file and should work
+with the default markup. To see them in action, open the html file for each.
+They'll run the QUnit testsuite itself. \ No newline at end of file
diff --git a/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/themes/gabe.css b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/themes/gabe.css
new file mode 100644
index 00000000..e66aa1f1
--- /dev/null
+++ b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/themes/gabe.css
@@ -0,0 +1,362 @@
+/**
+ * QUnit Theme by Gabe Hendry
+ *
+ * http://docs.jquery.com/QUnit
+ *
+ * Copyright 2012 jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+/** General Styles and Page Sturcture */
+body {
+ font-family:Arial, 'sans serif';
+ padding:20px 20px 0 20px;
+ position:relative;
+}
+
+h1, h2, h3, h4, h5, h6, #qunit-header, #qunit-banner {
+ font-family:Calibri, Arial, 'sans-serif';
+}
+
+h2 #qunit-tests, h2 #qunit-testrunner-toolbar, h2 #qunit-userAgent, #qunit-testresult {
+ font-family: Arial, 'sans-serif';
+}
+
+#qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; }
+#qunit-tests { font-size: smaller; }
+
+
+/** Resets */
+
+#qunit-tests, #qunit-tests ol, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult {
+ margin: 0;
+ padding: 0;
+}
+
+
+/** Headers */
+
+#qunit-header {
+ padding: 10px 0px 25px 0px;
+ color: #3B73B9;
+ font-size: 1.8em;
+ font-weight: normal;
+ height:2em;
+}
+
+#qunit-header a {
+ text-decoration: none;
+ color: #3B73B9;
+ font-weight:bold;
+ padding-right:22px;
+ float:left;
+
+}
+
+#qunit-header label {
+ font-size:14px;
+ color:#6BC9ED;
+ float:right;
+ font-family:Arial, 'sans-serif';
+ display: inline-block;
+}
+
+#qunit-header a + label:after {
+ content: ' }';
+}
+
+#qunit-header label + label {
+ margin-right:8px;
+}
+
+#qunit-header a:hover, #qunit-header a:focus {
+ color: #3B73B9;
+ background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAcCAYAAABoMT8aAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo4RjRENzREMkRFMzBFMTExQkZCM0YxOUI1MEUyRUQ0OCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpERkFDNTFBMjMwREYxMUUxQTA3RjlDQkNDQzY3MkI4MCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpERkFDNTFBMTMwREYxMUUxQTA3RjlDQkNDQzY3MkI4MCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4RjRENzREMkRFMzBFMTExQkZCM0YxOUI1MEUyRUQ0OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4RjRENzREMkRFMzBFMTExQkZCM0YxOUI1MEUyRUQ0OCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjKftvwAAAFqSURBVHja5NTNKwVRHMbxey9X3rrXStlY2ljJRiQLGytLIkUpIks7lIUFC9laCX+DhUiSlMRdsFBSdkqSt4u8ju+vnqkxZriZheTUp1NzzvxmzjnPTNxxnFiUlohFbL9fIL9xeOUf7EEiSgEbf8XUTwv04A59mIuyB2VowyqKvytQjkU8YwaFul6CJmQ+5MB38zSGUIAs8vCi3loc6bA3mECvJl2o0Jhn/B47qAorMIgU9lGJBc/YDZbQgNugAt1I4gGtepq1ZTxiHu2B34L6LpRiD6ee8UPUqfe2lPbl0i1Qoz4T8JCgm89hf6IKdwnX6tM5ZGIEb1py1i2wporNORToUDa2LStugVntdPKr3GvMUnmFUe8p2No3FNOBkCIWsn7NOcC6Pwd2EicoUiZsnVvYxZNutpM601F/CpIFpNazH5bIel1LqOAmqrWEwG/BirQorp3KgL3yMSZxFBYkf7OJ43/jp/ouwAB8JktCUeXXIAAAAABJRU5ErkJggg==') center right no-repeat;
+}
+
+h2, p {
+ padding: 10px 0 10px 0;
+ margin:0;
+ font-size:1.3em;
+}
+
+p {
+ padding-top:0;
+ font-size:small;
+ color:#7B7979;
+ line-height:1.6em;
+}
+
+h2#qunit-banner {
+ height: 16px;
+ padding:5px 5px 5px 25px;
+ line-height:16px;
+ margin:0px 0 15px 0;
+ border-radius: 5px;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ background-position:0px;
+ background-repeat:no-repeat;
+ font-size:1em;
+ font-weight:normal;
+}
+
+h2#qunit-banner.qunit-pass {
+ background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjc1RjgyNEY5MzE2NzExRTFCQTA0RTIzMEVFNkY4ODM2IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjc1RjgyNEZBMzE2NzExRTFCQTA0RTIzMEVFNkY4ODM2Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NzVGODI0RjczMTY3MTFFMUJBMDRFMjMwRUU2Rjg4MzYiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NzVGODI0RjgzMTY3MTFFMUJBMDRFMjMwRUU2Rjg4MzYiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4C94F5AAAAwklEQVR42mL8//8/AyWAiYFCQLEBLOW7GEnVYwzEaUC8B4hXs5CoWRCIVwGxEtQQE1K9ANMMN5AUAzqA2AWJ/x6IzxJrAMi55WhiriBDYAYoEQi0DjSxdJDtsGgESd4F4jNYDAIF2m4oDQOzoBieDsqRbDoDpWEAXfMeqO0oCWkPmo1noH6eiWbYPSAOw5YSQYKr0cRnQg1BDvEwKI1hAEyyAk9AVsACDV9e6MRhSydyoBHKTKuh8bsHSTM+lzEABBgAXD0oIFydPtEAAAAASUVORK5CYII=');
+ color:#76B900;
+}
+
+h2#qunit-banner.qunit-pass:after {
+ content:'Congrats! All of your tests passed!';
+}
+
+h2#qunit-banner.qunit-fail {
+ background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjU5QUIzNEU2MzE2NzExRTE4ODc3OEVFNEY2NzhDMjM4IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjU5QUIzNEU3MzE2NzExRTE4ODc3OEVFNEY2NzhDMjM4Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NTlBQjM0RTQzMTY3MTFFMTg4Nzc4RUU0RjY3OEMyMzgiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NTlBQjM0RTUzMTY3MTFFMTg4Nzc4RUU0RjY3OEMyMzgiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz46NEjgAAAAzElEQVR42mL8//8/AyWABUS8N1EFUS5AfA+KcQFBIE6DsjsFz9yGGAAEu6EGgEA6EM/CoRmkzhiJX8EE5bggKZyJZAsuzQwwNhMOp6IbsgpNM9jn8DCAOnsmFkNgNrlg0dyJbMAsNE0MOPgwza5AfBbdC7OgLsEHUDRjCwNChqBoxhWIxngMQI8dDAPKsSlCM2AmLgNAkh04/I3TECZcJiNFrys+Q2AGhOLQPAsaaLgMwZkS0fMDLkPgBqzGoxnZEBMg3gM1CBzdAAEGABpTMr+umvCXAAAAAElFTkSuQmCC');
+ color:#ee3324;
+}
+
+h2#qunit-banner.qunit-fail:after {
+ content:'Oops! One or more tests failed!';
+}
+
+/** Test Runner Result Styles */
+
+#qunit-testrunner-toolbar {
+ position:absolute;
+ top:55px;
+ right:20px;
+ color:#6BC9ED;
+ font-size:14px;
+}
+
+#qunit-testrunner-toolbar:after {
+ content:' }';
+}
+
+h2#qunit-userAgent {
+ padding: 0;
+ color: #7B7979;
+ border:0;
+ font-size:small;
+ font-family: Arial, 'sans-serif';
+ font-weight:normal;
+ font-style:italic;
+}
+
+h2#qunit-userAgent:before {
+ content:'User Agents: ';
+}
+
+
+/** Tests: Pass/Fail */
+
+#qunit-tests {
+ list-style-position: inside;
+ list-style-type:none;
+}
+
+#qunit-tests li {
+ padding: 4px 10px;
+ list-style-position:outside;
+ border-radius: 5px;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ margin-bottom:5px;
+ position:relative;
+ *zoom:1;
+ list-style-type:none;
+}
+
+#qunit-tests.hidepass li.pass, #qunit-tests.hidepass li.running {
+ display: none;
+}
+
+#qunit-tests li strong {
+ cursor: pointer;
+}
+
+#qunit-tests li a {
+ display:block;
+ position:absolute;
+ right:10px;
+ padding:0px 16px 0 0;
+ font-size:0.8em;
+ background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAYCAYAAADOMhxqAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo4RjRENzREMkRFMzBFMTExQkZCM0YxOUI1MEUyRUQ0OCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpENEZDRDdDQTMxODUxMUUxOTc3NEQ0OTUxNjc4REFEQiIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpENEZDRDdDOTMxODUxMUUxOTc3NEQ0OTUxNjc4REFEQiIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5MDRENzREMkRFMzBFMTExQkZCM0YxOUI1MEUyRUQ0OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4RjRENzREMkRFMzBFMTExQkZCM0YxOUI1MEUyRUQ0OCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PpE8SAQAAAD3SURBVHjaYsw5+YYBC5gGxN+BuBhdgoUBO1AFYlMgFgXiOGQJJjSFrEDcC8RaQMwPxEFAvBuXDSDFP6D4F1SMG4gtgFgBiB+g2/ATiL8C8UIgPgMV+wvEujDFyBoWQRVPB+IsqOa3QCyFrBhZgysQMwLxFCjfB4hFgPgVlH8DiOcha/jHgBu0ALEMEH9G1rAXqikHi4ZkIP4DxEuQNaQBMReUngjEdkAcDPU8KKROAPFp5GAFBSUPNHZToZEFM+wsEHtgiziQJmYg7gPiy0B8HIiTgNgRX0yD/FFzYdXZK0B8Fchei5GWgBI40xJQbjQtjdi0BBBgAAsUYVWmfe1CAAAAAElFTkSuQmCC') bottom right no-repeat;
+ color: #3b73b9;
+ text-decoration: none;
+ height:12px;
+ top:5px;
+}
+#qunit-tests li a:hover,
+#qunit-tests li a:focus {
+ color: #6bc9ed;
+ background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAYCAYAAADOMhxqAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo4RjRENzREMkRFMzBFMTExQkZCM0YxOUI1MEUyRUQ0OCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpENEZDRDdDQTMxODUxMUUxOTc3NEQ0OTUxNjc4REFEQiIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpENEZDRDdDOTMxODUxMUUxOTc3NEQ0OTUxNjc4REFEQiIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5MDRENzREMkRFMzBFMTExQkZCM0YxOUI1MEUyRUQ0OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4RjRENzREMkRFMzBFMTExQkZCM0YxOUI1MEUyRUQ0OCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PpE8SAQAAAD3SURBVHjaYsw5+YYBC5gGxN+BuBhdgoUBO1AFYlMgFgXiOGQJJjSFrEDcC8RaQMwPxEFAvBuXDSDFP6D4F1SMG4gtgFgBiB+g2/ATiL8C8UIgPgMV+wvEujDFyBoWQRVPB+IsqOa3QCyFrBhZgysQMwLxFCjfB4hFgPgVlH8DiOcha/jHgBu0ALEMEH9G1rAXqikHi4ZkIP4DxEuQNaQBMReUngjEdkAcDPU8KKROAPFp5GAFBSUPNHZToZEFM+wsEHtgiziQJmYg7gPiy0B8HIiTgNgRX0yD/FFzYdXZK0B8Fchei5GWgBI40xJQbjQtjdi0BBBgAAsUYVWmfe1CAAAAAElFTkSuQmCC') top right no-repeat;
+}
+#qunit-tests li.pass strong > span {color:#76B900;}
+#qunit-tests li.pass strong:first-child {
+ padding-left:20px;
+ background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo5MTRENzREMkRFMzBFMTExQkZCM0YxOUI1MEUyRUQ0OCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDozODgyNDY5QzMxN0ExMUUxOTdFMkVCQkNENjFBMjc3RSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDozODgyNDY5QjMxN0ExMUUxOTdFMkVCQkNENjFBMjc3RSIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5MTRENzREMkRFMzBFMTExQkZCM0YxOUI1MEUyRUQ0OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5MTRENzREMkRFMzBFMTExQkZCM0YxOUI1MEUyRUQ0OCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pv7qI08AAAClSURBVHjaYvz//z8DKYClfBcjMeqUgFgQiM+yEKEYpHA3VFMYExEaVkEVg20ipKEDiF2g7LNAPIsJaqUgFsVpQFwOZb8H4nQQzQR13zuoAhgwhpoOA2FQGxiYkNw3E4phnoTZWgHEe2A6maC63yM54y6S4llA3InsTiaobhOYlUiKz0JNZ0DXAAL3gNgViFcjeRLZZkRMI7FhioyhBrzHFs4AAQYAz08iXvWgossAAAAASUVORK5CYII=') center left no-repeat;
+}
+
+#qunit-tests li.fail strong > span {color:#EE3324;}
+#qunit-tests li.fail strong:first-child {
+ padding-left:20px;
+ background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo5MTRENzREMkRFMzBFMTExQkZCM0YxOUI1MEUyRUQ0OCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo0MzNBNEM0QzMxN0ExMUUxQjk0MUYyOEJCODA0OTM1OSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo0MzNBNEM0QjMxN0ExMUUxQjk0MUYyOEJCODA0OTM1OSIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5MTRENzREMkRFMzBFMTExQkZCM0YxOUI1MEUyRUQ0OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5MTRENzREMkRFMzBFMTExQkZCM0YxOUI1MEUyRUQ0OCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PnO7dSIAAACtSURBVHjaYnxnrMIABEpA/B6K0YEgEBsD8VnBM7ffM0E5d6HYGIvi3UiYgQkqiCyJrAmZbwzTcBaKYZrOAHEaEM9E05wOIlig7nZFM20mmtM6gXgWzAYGJE1nsXgapLACxmFCkniPQwOKGLKGmVC3owMUcZiGDjTFs9BMhmuCxUM5muJ0qJ9Wo2lCcRII7IEFH9RPYbDQgaUCFqjVYdDkMQuLH9Khau6BOAABBgDmhyuetyQ3ywAAAABJRU5ErkJggg==') center left no-repeat;
+}
+
+#qunit-tests li ol {
+ margin:0;
+ padding:10px 0 0 0;
+ background-color: #fff;
+}
+
+#qunit-tests li ol li {
+ list-style-position: inside;
+ list-style-type:decimal;
+ *list-style-position: outside;
+}
+
+#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: #add566;
+ color: #555;
+ text-decoration: none;
+}
+
+#qunit-tests ins {
+ background-color: #f5857c;
+ color: #555;
+ text-decoration: none;
+}
+
+/*** Test Counts */
+
+#qunit-tests b.counts {
+ color: #7B7979;
+ font-size:0.8em;
+ margin-left:10px;
+}
+
+b.counts b.passed, b.counts b.failed {
+ display:inline-block;
+ padding:0px 1px;
+ border-radius: 3px;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ color:#FFF;
+}
+
+b.counts b.passed {
+ background:#76b900;
+}
+
+b.counts b.failed {
+ background:#ee3324;
+ }
+
+
+#qunit-tests li li {
+ margin:0 0 5px;
+ padding: 0.4em 0.5em 0.4em 0.5em;
+ background-color: #fff;
+ border-bottom: none;
+ border-radius: 3px;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ overflow:auto;
+}
+
+/*** Passing Styles */
+
+#qunit-tests li li.pass {
+ color: #7B7979;
+ background-color: #fff;
+ border-left: 20px solid #76B900;
+}
+
+#qunit-tests .pass { color: #76B900; background-color: #FFF; border: 1px solid #add566; }
+
+#qunit-tests .pass .test-actual,
+#qunit-tests .pass .test-expected { color: #999999; }
+
+
+/*** Failing Styles */
+#qunit-tests li.fail ol {
+ background:#f7f7f7;
+}
+
+#qunit-tests li li.fail {
+ color: #7B7979;
+ background-color: #fff;
+ border-left: 20px solid #EE3324;
+ white-space: pre;
+}
+
+#qunit-tests .fail { color: #EE3324; border: 1px solid #f5857c; background-color: #f7f7f7; }
+
+
+#qunit-tests .fail .test-actual,
+#qunit-tests .fail .test-expected { color: #999999; }
+
+
+
+/** Result */
+
+p#qunit-testresult {
+ padding: 10px 0;
+ font-weight:bold;
+ line-height:1.6em;
+ color: #7B7979;
+}
+
+p#qunit-testresult span.passed, p#qunit-testresult span.failed {
+ font-size:1.5em;
+ font-weight:bold;
+ display:inline-block;
+ padding:3px;
+ border-radius: 5px;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+}
+
+p#qunit-testresult span.passed {
+ color:#FFF;
+ background:#76b900
+}
+
+p#qunit-testresult span.failed {
+ color:#FFF;
+ background:#ee3324;
+}
+
+
+/** Fixture */
+
+#qunit-fixture {
+ position: absolute;
+ top: -10000px;
+ left: -10000px;
+ width: 1000px;
+ height: 1000px;
+}
diff --git a/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/themes/gabe.html b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/themes/gabe.html
new file mode 100644
index 00000000..ea532475
--- /dev/null
+++ b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/themes/gabe.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>QUnit Test Suite - Gabe Theme</title>
+ <link rel="stylesheet" href="gabe.css" type="text/css" media="screen">
+ <script type="text/javascript" src="../../qunit/qunit.js"></script>
+ <script type="text/javascript" src="../../test/test.js"></script>
+ <script type="text/javascript" src="../../test/deepEqual.js"></script>
+</head>
+<body>
+ <div id="qunit"></div>
+ <div id="qunit-fixture">test markup</div>
+</body>
+</html>
diff --git a/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/themes/nv.css b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/themes/nv.css
new file mode 100644
index 00000000..1453e4c0
--- /dev/null
+++ b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/themes/nv.css
@@ -0,0 +1,208 @@
+/**
+ * QUnit Theme by NV
+ *
+ * http://docs.jquery.com/QUnit
+ *
+ * Copyright 2012 jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+/** Font Family and Sizes */
+
+#qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult {
+ font-family: "Helvetica Neue", Helvetica, sans-serif;
+}
+
+#qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; }
+#qunit-tests { font-size: smaller; }
+
+
+/** Resets */
+
+#qunit-wrapper, #qunit-tests, #qunit-tests ol, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult {
+ margin: 0;
+ padding: 0;
+}
+
+
+/** Header */
+
+#qunit-header {
+ font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Helvetica, sans-serif;
+ padding: 0.5em 0 0.5em 1.3em;
+
+ color: #8699a4;
+ background-color: #0d3349;
+
+ font-size: 1.5em;
+ line-height: 1em;
+ font-weight: normal;
+}
+
+#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.qunit-pass {
+ height: 3px;
+}
+#qunit-banner.qunit-fail {
+ height: 5px;
+}
+
+#qunit-testrunner-toolbar {
+ padding: 0 0 0.5em 2em;
+}
+
+#qunit-testrunner-toolbar label {
+ margin-right: 1em;
+}
+
+#qunit-userAgent {
+ padding: 0.5em 0 0.5em 2.5em;
+ font-weight: normal;
+ color: #666;
+}
+
+
+/** Tests: Pass/Fail */
+
+#qunit-tests {
+ list-style-type: none;
+ background-color: #D2E0E6;
+}
+
+#qunit-tests li {
+ padding: 0.4em 0.5em 0.4em 2.5em;
+}
+
+#qunit-tests li strong {
+ font-weight: normal;
+ cursor: pointer;
+}
+
+#qunit-tests ol {
+ margin: 0.5em 0 1em;
+ background-color: #fff;
+}
+
+#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.passed { color: #5E740B; }
+#qunit-tests b.failed {
+ color: #710909;
+}
+#qunit-tests li.fail .failed {
+ color: #E48989;
+}
+#qunit-tests li.fail .passed {
+ color: #E3C987;
+}
+
+#qunit-tests li li {
+ margin-left: 2.5em;
+ padding: 0.7em 0.5em 0.7em 0;
+ background-color: #fff;
+ border-bottom: none;
+}
+
+#qunit-tests b.counts {
+ font-weight: normal;
+}
+
+/*** Passing Styles */
+
+#qunit-tests li li.pass {
+ color: #5E740B;
+ background-color: #fff;
+}
+
+#qunit-tests .pass { color: #2f3424; background-color: #d9dec3; }
+#qunit-tests .pass .module-name { color: #636b51; }
+
+#qunit-tests .pass .test-actual,
+#qunit-tests .pass .test-expected { color: #999999; }
+
+#qunit-banner.qunit-pass { background-color: #C6E746; }
+
+/*** Failing Styles */
+
+#qunit-tests li li.fail {
+ color: #710909;
+ background-color: #fff;
+}
+
+#qunit-tests .fail { color: #fff; background-color: #962323; }
+#qunit-tests .fail .module-name,
+#qunit-tests .fail .counts { color: #DEC1C1; }
+
+#qunit-tests .fail .test-actual { color: #B72F2F; }
+#qunit-tests .fail .test-expected { color: green; }
+
+#qunit-banner.qunit-fail,
+#qunit-testrunner-toolbar { color: #dec1c1; background-color: #962323; }
+
+
+/** Footer */
+
+#qunit-testresult {
+ padding: 0.5em 0.5em 0.5em 2.5em;
+ color: #333;
+}
+#qunit-testresult .module-name {
+ font-weight: bold;
+}
+
+/** Fixture */
+
+#qunit-fixture {
+ position: absolute;
+ top: -10000px;
+ left: -10000px;
+ width: 1000px;
+ height: 1000px;
+}
diff --git a/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/themes/nv.html b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/themes/nv.html
new file mode 100644
index 00000000..42084508
--- /dev/null
+++ b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/themes/nv.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>QUnit Test Suite - NV Theme</title>
+ <link rel="stylesheet" href="nv.css" type="text/css" media="screen">
+ <script type="text/javascript" src="../../qunit/qunit.js"></script>
+ <script type="text/javascript" src="../../test/test.js"></script>
+ <script type="text/javascript" src="../../test/deepEqual.js"></script>
+</head>
+<body>
+ <div id="qunit"></div>
+ <div id="qunit-fixture">test markup</div>
+</body>
+</html>
diff --git a/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/grunt.js b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/grunt.js
new file mode 100644
index 00000000..448cbf2b
--- /dev/null
+++ b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/grunt.js
@@ -0,0 +1,114 @@
+/*global config:true, task:true*/
+module.exports = function( grunt ) {
+
+grunt.loadNpmTasks( "grunt-git-authors" );
+
+grunt.initConfig({
+ pkg: '<json:package.json>',
+ qunit: {
+ // TODO include 'test/logs.html' as well
+ qunit: 'test/index.html',
+ addons: [
+ 'addons/canvas/canvas.html',
+ 'addons/close-enough/close-enough.html',
+ 'addons/composite/composite-demo-test.html'
+ ]
+ },
+ lint: {
+ qunit: 'qunit/qunit.js',
+ // addons: 'addons/**/*.js',
+ grunt: 'grunt.js'
+ // TODO need to figure out which warnings to fix and which to disable
+ // tests: 'test/test.js'
+ },
+ jshint: {
+ qunit: {
+ options: {
+ onevar: true,
+ browser: true,
+ bitwise: true,
+ curly: true,
+ trailing: true,
+ immed: true,
+ latedef: false,
+ newcap: true,
+ noarg: false,
+ noempty: true,
+ nonew: true,
+ sub: true,
+ undef: true,
+ eqnull: true,
+ proto: true,
+ smarttabs: true
+ },
+ globals: {
+ jQuery: true,
+ exports: true
+ }
+ },
+ addons: {
+ options: {
+ browser: true,
+ curly: true,
+ eqnull: true,
+ eqeqeq: true,
+ expr: true,
+ evil: true,
+ jquery: true,
+ latedef: true,
+ noarg: true,
+ onevar: true,
+ smarttabs: true,
+ trailing: true,
+ undef: true
+ },
+ globals: {
+ module: true,
+ test: true,
+ asyncTest: true,
+ expect: true,
+ start: true,
+ stop: true,
+ QUnit: true
+ }
+ },
+ tests: {
+ }
+ }
+});
+
+grunt.registerTask( "build-git", function( sha ) {
+ function processor( content ) {
+ var tagline = " - A JavaScript Unit Testing Framework";
+ return content.replace( tagline, "-" + sha + " " + grunt.template.today('isoDate') + tagline );
+ }
+ grunt.file.copy( "qunit/qunit.css", "dist/qunit-git.css", {
+ process: processor
+ });
+ grunt.file.copy( "qunit/qunit.js", "dist/qunit-git.js", {
+ process: processor
+ });
+});
+
+grunt.registerTask( "testswarm", function( commit, configFile ) {
+ var testswarm = require( "testswarm" ),
+ config = grunt.file.readJSON( configFile ).qunit;
+ testswarm({
+ url: config.swarmUrl,
+ pollInterval: 10000,
+ timeout: 1000 * 60 * 30,
+ done: this.async()
+ }, {
+ authUsername: "qunit",
+ authToken: config.authToken,
+ jobName: 'QUnit commit #<a href="https://github.com/jquery/qunit/commit/' + commit + '">' + commit.substr( 0, 10 ) + '</a>',
+ runMax: config.runMax,
+ "runNames[]": "QUnit",
+ "runUrls[]": config.testUrl + commit + "/test/index.html",
+ "browserSets[]": ["popular"]
+ });
+});
+
+grunt.registerTask('default', 'lint qunit');
+
+};
diff --git a/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/package.json b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/package.json
new file mode 100644
index 00000000..fb6abe2b
--- /dev/null
+++ b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/package.json
@@ -0,0 +1,37 @@
+{
+ "name": "qunitjs",
+ "title": "QUnit",
+ "description": "An easy-to-use JavaScript Unit Testing framework.",
+ "version": "1.10.0",
+ "author": {
+ "name": "jQuery Foundation and other contributors",
+ "url": "https://github.com/jquery/qunit/blob/master/AUTHORS.txt"
+ },
+ "contributors": [
+ "John Resig <jeresig@gmail.com> (http://ejohn.org/)",
+ "Jörn Zaefferer <joern.zaefferer@gmail.com> (http://bassistance.de/)"
+ ],
+ "homepage": "http://qunitjs.com",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/jquery/qunit.git"
+ },
+ "bugs": {
+ "url": "https://github.com/jquery/qunit/issues"
+ },
+ "license": {
+ "name": "MIT",
+ "url": "http://www.opensource.org/licenses/mit-license.php"
+ },
+ "keywords": [
+ "testing",
+ "unit",
+ "jquery"
+ ],
+ "main": "qunit/qunit.js",
+ "devDependencies": {
+ "grunt": "0.3.x",
+ "grunt-git-authors": "1.0.0",
+ "testswarm": "0.2.2"
+ }
+}
diff --git a/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/qunit/qunit.css b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/qunit/qunit.css
new file mode 100644
index 00000000..55970e00
--- /dev/null
+++ b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/qunit/qunit.css
@@ -0,0 +1,235 @@
+/**
+ * QUnit v1.10.0 - A JavaScript Unit Testing Framework
+ *
+ * http://qunitjs.com
+ *
+ * Copyright 2012 jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+/** 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, sans-serif;
+}
+
+#qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; }
+#qunit-tests { font-size: smaller; }
+
+
+/** Resets */
+
+#qunit-tests, #qunit-tests ol, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult, #qunit-modulefilter {
+ margin: 0;
+ padding: 0;
+}
+
+
+/** Header */
+
+#qunit-header {
+ padding: 0.5em 0 0.5em 1em;
+
+ color: #8699a4;
+ background-color: #0d3349;
+
+ font-size: 1.5em;
+ line-height: 1em;
+ font-weight: normal;
+
+ border-radius: 5px 5px 0 0;
+ -moz-border-radius: 5px 5px 0 0;
+ -webkit-border-top-right-radius: 5px;
+ -webkit-border-top-left-radius: 5px;
+}
+
+#qunit-header a {
+ text-decoration: none;
+ color: #c2ccd1;
+}
+
+#qunit-header a:hover,
+#qunit-header a:focus {
+ color: #fff;
+}
+
+#qunit-testrunner-toolbar label {
+ display: inline-block;
+ padding: 0 .5em 0 .1em;
+}
+
+#qunit-banner {
+ height: 5px;
+}
+
+#qunit-testrunner-toolbar {
+ padding: 0.5em 0 0.5em 2em;
+ color: #5E740B;
+ background-color: #eee;
+ overflow: hidden;
+}
+
+#qunit-userAgent {
+ padding: 0.5em 0 0.5em 2.5em;
+ background-color: #2b81af;
+ color: #fff;
+ text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px;
+}
+
+#qunit-modulefilter-container {
+ float: right;
+}
+
+/** Tests: Pass/Fail */
+
+#qunit-tests {
+ list-style-position: inside;
+}
+
+#qunit-tests li {
+ padding: 0.4em 0.5em 0.4em 2.5em;
+ border-bottom: 1px solid #fff;
+ 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 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: 5px;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+}
+
+#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 {
+ padding: 5px;
+ background-color: #fff;
+ border-bottom: none;
+ list-style-position: inside;
+}
+
+/*** Passing Styles */
+
+#qunit-tests li li.pass {
+ color: #3c510c;
+ background-color: #fff;
+ border-left: 10px solid #C6E746;
+}
+
+#qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; }
+#qunit-tests .pass .test-name { color: #366097; }
+
+#qunit-tests .pass .test-actual,
+#qunit-tests .pass .test-expected { color: #999999; }
+
+#qunit-banner.qunit-pass { background-color: #C6E746; }
+
+/*** Failing Styles */
+
+#qunit-tests li li.fail {
+ color: #710909;
+ background-color: #fff;
+ border-left: 10px solid #EE5757;
+ white-space: pre;
+}
+
+#qunit-tests > li:last-child {
+ border-radius: 0 0 5px 5px;
+ -moz-border-radius: 0 0 5px 5px;
+ -webkit-border-bottom-right-radius: 5px;
+ -webkit-border-bottom-left-radius: 5px;
+}
+
+#qunit-tests .fail { color: #000000; background-color: #EE5757; }
+#qunit-tests .fail .test-name,
+#qunit-tests .fail .module-name { color: #000000; }
+
+#qunit-tests .fail .test-actual { color: #EE5757; }
+#qunit-tests .fail .test-expected { color: green; }
+
+#qunit-banner.qunit-fail { background-color: #EE5757; }
+
+
+/** Result */
+
+#qunit-testresult {
+ padding: 0.5em 0.5em 0.5em 2.5em;
+
+ color: #2b81af;
+ background-color: #D2E0E6;
+
+ border-bottom: 1px solid white;
+}
+#qunit-testresult .module-name {
+ font-weight: bold;
+}
+
+/** Fixture */
+
+#qunit-fixture {
+ position: absolute;
+ top: -10000px;
+ left: -10000px;
+ width: 1000px;
+ height: 1000px;
+}
diff --git a/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/qunit/qunit.js b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/qunit/qunit.js
new file mode 100644
index 00000000..d4f17b5a
--- /dev/null
+++ b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/qunit/qunit.js
@@ -0,0 +1,1977 @@
+/**
+ * QUnit v1.10.0 - A JavaScript Unit Testing Framework
+ *
+ * http://qunitjs.com
+ *
+ * Copyright 2012 jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+(function( window ) {
+
+var QUnit,
+ config,
+ onErrorFnPrev,
+ testId = 0,
+ fileName = (sourceFromStacktrace( 0 ) || "" ).replace(/(:\d+)+\)?/, "").replace(/.+\//, ""),
+ toString = Object.prototype.toString,
+ hasOwn = Object.prototype.hasOwnProperty,
+ // Keep a local reference to Date (GH-283)
+ Date = window.Date,
+ defined = {
+ setTimeout: typeof window.setTimeout !== "undefined",
+ sessionStorage: (function() {
+ var x = "qunit-test-string";
+ try {
+ sessionStorage.setItem( x, x );
+ sessionStorage.removeItem( x );
+ return true;
+ } catch( e ) {
+ return false;
+ }
+ }())
+};
+
+function Test( settings ) {
+ extend( this, settings );
+ this.assertions = [];
+ this.testNumber = ++Test.count;
+}
+
+Test.count = 0;
+
+Test.prototype = {
+ init: function() {
+ var a, b, li,
+ tests = id( "qunit-tests" );
+
+ if ( tests ) {
+ b = document.createElement( "strong" );
+ b.innerHTML = this.name;
+
+ // `a` initialized at top of scope
+ a = document.createElement( "a" );
+ a.innerHTML = "Rerun";
+ a.href = QUnit.url({ testNumber: this.testNumber });
+
+ li = document.createElement( "li" );
+ li.appendChild( b );
+ li.appendChild( a );
+ li.className = "running";
+ li.id = this.id = "qunit-test-output" + testId++;
+
+ tests.appendChild( li );
+ }
+ },
+ setup: function() {
+ if ( this.module !== config.previousModule ) {
+ if ( config.previousModule ) {
+ runLoggingCallbacks( "moduleDone", QUnit, {
+ name: config.previousModule,
+ failed: config.moduleStats.bad,
+ passed: config.moduleStats.all - config.moduleStats.bad,
+ total: config.moduleStats.all
+ });
+ }
+ config.previousModule = this.module;
+ config.moduleStats = { all: 0, bad: 0 };
+ runLoggingCallbacks( "moduleStart", QUnit, {
+ name: this.module
+ });
+ } else if ( config.autorun ) {
+ runLoggingCallbacks( "moduleStart", QUnit, {
+ name: this.module
+ });
+ }
+
+ config.current = this;
+
+ this.testEnvironment = extend({
+ setup: function() {},
+ teardown: function() {}
+ }, this.moduleTestEnvironment );
+
+ runLoggingCallbacks( "testStart", QUnit, {
+ name: this.testName,
+ module: this.module
+ });
+
+ // allow utility functions to access the current test environment
+ // TODO why??
+ QUnit.current_testEnvironment = this.testEnvironment;
+
+ if ( !config.pollution ) {
+ saveGlobal();
+ }
+ if ( config.notrycatch ) {
+ this.testEnvironment.setup.call( this.testEnvironment );
+ return;
+ }
+ try {
+ this.testEnvironment.setup.call( this.testEnvironment );
+ } catch( e ) {
+ QUnit.pushFailure( "Setup failed on " + this.testName + ": " + e.message, extractStacktrace( e, 1 ) );
+ }
+ },
+ run: function() {
+ config.current = this;
+
+ var running = id( "qunit-testresult" );
+
+ if ( running ) {
+ running.innerHTML = "Running: <br/>" + this.name;
+ }
+
+ if ( this.async ) {
+ QUnit.stop();
+ }
+
+ if ( config.notrycatch ) {
+ this.callback.call( this.testEnvironment, QUnit.assert );
+ return;
+ }
+
+ try {
+ this.callback.call( this.testEnvironment, QUnit.assert );
+ } catch( e ) {
+ QUnit.pushFailure( "Died on test #" + (this.assertions.length + 1) + " " + this.stack + ": " + e.message, extractStacktrace( e, 0 ) );
+ // else next test will carry the responsibility
+ saveGlobal();
+
+ // Restart the tests if they're blocking
+ if ( config.blocking ) {
+ QUnit.start();
+ }
+ }
+ },
+ teardown: function() {
+ config.current = this;
+ if ( config.notrycatch ) {
+ this.testEnvironment.teardown.call( this.testEnvironment );
+ return;
+ } else {
+ try {
+ this.testEnvironment.teardown.call( this.testEnvironment );
+ } catch( e ) {
+ QUnit.pushFailure( "Teardown failed on " + this.testName + ": " + e.message, extractStacktrace( e, 1 ) );
+ }
+ }
+ checkPollution();
+ },
+ finish: function() {
+ config.current = this;
+ if ( config.requireExpects && this.expected == null ) {
+ QUnit.pushFailure( "Expected number of assertions to be defined, but expect() was not called.", this.stack );
+ } else if ( this.expected != null && this.expected != this.assertions.length ) {
+ QUnit.pushFailure( "Expected " + this.expected + " assertions, but " + this.assertions.length + " were run", this.stack );
+ } else if ( this.expected == null && !this.assertions.length ) {
+ QUnit.pushFailure( "Expected at least one assertion, but none were run - call expect(0) to accept zero assertions.", this.stack );
+ }
+
+ var assertion, a, b, i, li, ol,
+ test = this,
+ good = 0,
+ bad = 0,
+ tests = id( "qunit-tests" );
+
+ config.stats.all += this.assertions.length;
+ config.moduleStats.all += this.assertions.length;
+
+ if ( tests ) {
+ ol = document.createElement( "ol" );
+
+ for ( i = 0; i < this.assertions.length; i++ ) {
+ assertion = this.assertions[i];
+
+ li = document.createElement( "li" );
+ li.className = assertion.result ? "pass" : "fail";
+ li.innerHTML = assertion.message || ( assertion.result ? "okay" : "failed" );
+ ol.appendChild( li );
+
+ if ( assertion.result ) {
+ good++;
+ } else {
+ bad++;
+ config.stats.bad++;
+ config.moduleStats.bad++;
+ }
+ }
+
+ // store result when possible
+ if ( QUnit.config.reorder && defined.sessionStorage ) {
+ if ( bad ) {
+ sessionStorage.setItem( "qunit-test-" + this.module + "-" + this.testName, bad );
+ } else {
+ sessionStorage.removeItem( "qunit-test-" + this.module + "-" + this.testName );
+ }
+ }
+
+ if ( bad === 0 ) {
+ ol.style.display = "none";
+ }
+
+ // `b` initialized at top of scope
+ b = document.createElement( "strong" );
+ b.innerHTML = this.name + " <b class='counts'>(<b class='failed'>" + bad + "</b>, <b class='passed'>" + good + "</b>, " + this.assertions.length + ")</b>";
+
+ addEvent(b, "click", function() {
+ var next = b.nextSibling.nextSibling,
+ display = next.style.display;
+ next.style.display = display === "none" ? "block" : "none";
+ });
+
+ addEvent(b, "dblclick", function( e ) {
+ var target = e && e.target ? e.target : window.event.srcElement;
+ if ( target.nodeName.toLowerCase() == "span" || target.nodeName.toLowerCase() == "b" ) {
+ target = target.parentNode;
+ }
+ if ( window.location && target.nodeName.toLowerCase() === "strong" ) {
+ window.location = QUnit.url({ testNumber: test.testNumber });
+ }
+ });
+
+ // `li` initialized at top of scope
+ li = id( this.id );
+ li.className = bad ? "fail" : "pass";
+ li.removeChild( li.firstChild );
+ a = li.firstChild;
+ li.appendChild( b );
+ li.appendChild ( a );
+ li.appendChild( ol );
+
+ } else {
+ for ( i = 0; i < this.assertions.length; i++ ) {
+ if ( !this.assertions[i].result ) {
+ bad++;
+ config.stats.bad++;
+ config.moduleStats.bad++;
+ }
+ }
+ }
+
+ runLoggingCallbacks( "testDone", QUnit, {
+ name: this.testName,
+ module: this.module,
+ failed: bad,
+ passed: this.assertions.length - bad,
+ total: this.assertions.length
+ });
+
+ QUnit.reset();
+
+ config.current = undefined;
+ },
+
+ queue: function() {
+ var bad,
+ test = this;
+
+ synchronize(function() {
+ test.init();
+ });
+ function run() {
+ // each of these can by async
+ synchronize(function() {
+ test.setup();
+ });
+ synchronize(function() {
+ test.run();
+ });
+ synchronize(function() {
+ test.teardown();
+ });
+ synchronize(function() {
+ test.finish();
+ });
+ }
+
+ // `bad` initialized at top of scope
+ // defer when previous test run passed, if storage is available
+ bad = QUnit.config.reorder && defined.sessionStorage &&
+ +sessionStorage.getItem( "qunit-test-" + this.module + "-" + this.testName );
+
+ if ( bad ) {
+ run();
+ } else {
+ synchronize( run, true );
+ }
+ }
+};
+
+// Root QUnit object.
+// `QUnit` initialized at top of scope
+QUnit = {
+
+ // call on start of module test to prepend name to all tests
+ module: function( name, testEnvironment ) {
+ config.currentModule = name;
+ config.currentModuleTestEnvironment = testEnvironment;
+ config.modules[name] = true;
+ },
+
+ asyncTest: function( testName, expected, callback ) {
+ if ( arguments.length === 2 ) {
+ callback = expected;
+ expected = null;
+ }
+
+ QUnit.test( testName, expected, callback, true );
+ },
+
+ test: function( testName, expected, callback, async ) {
+ var test,
+ name = "<span class='test-name'>" + escapeInnerText( testName ) + "</span>";
+
+ if ( arguments.length === 2 ) {
+ callback = expected;
+ expected = null;
+ }
+
+ if ( config.currentModule ) {
+ name = "<span class='module-name'>" + config.currentModule + "</span>: " + name;
+ }
+
+ test = new Test({
+ name: name,
+ testName: testName,
+ expected: expected,
+ async: async,
+ callback: callback,
+ module: config.currentModule,
+ moduleTestEnvironment: config.currentModuleTestEnvironment,
+ stack: sourceFromStacktrace( 2 )
+ });
+
+ if ( !validTest( test ) ) {
+ return;
+ }
+
+ test.queue();
+ },
+
+ // Specify the number of expected assertions to gurantee that failed test (no assertions are run at all) don't slip through.
+ expect: function( asserts ) {
+ if (arguments.length === 1) {
+ config.current.expected = asserts;
+ } else {
+ return config.current.expected;
+ }
+ },
+
+ start: function( count ) {
+ config.semaphore -= count || 1;
+ // don't start until equal number of stop-calls
+ if ( config.semaphore > 0 ) {
+ return;
+ }
+ // ignore if start is called more often then stop
+ if ( config.semaphore < 0 ) {
+ config.semaphore = 0;
+ }
+ // A slight delay, to avoid any current callbacks
+ if ( defined.setTimeout ) {
+ window.setTimeout(function() {
+ if ( config.semaphore > 0 ) {
+ return;
+ }
+ if ( config.timeout ) {
+ clearTimeout( config.timeout );
+ }
+
+ config.blocking = false;
+ process( true );
+ }, 13);
+ } else {
+ config.blocking = false;
+ process( true );
+ }
+ },
+
+ stop: function( count ) {
+ config.semaphore += count || 1;
+ config.blocking = true;
+
+ if ( config.testTimeout && defined.setTimeout ) {
+ clearTimeout( config.timeout );
+ config.timeout = window.setTimeout(function() {
+ QUnit.ok( false, "Test timed out" );
+ config.semaphore = 1;
+ QUnit.start();
+ }, config.testTimeout );
+ }
+ }
+};
+
+// Asssert helpers
+// All of these must call either QUnit.push() or manually do:
+// - runLoggingCallbacks( "log", .. );
+// - config.current.assertions.push({ .. });
+QUnit.assert = {
+ /**
+ * Asserts rough true-ish result.
+ * @name ok
+ * @function
+ * @example ok( "asdfasdf".length > 5, "There must be at least 5 chars" );
+ */
+ ok: function( result, msg ) {
+ if ( !config.current ) {
+ throw new Error( "ok() assertion outside test context, was " + sourceFromStacktrace(2) );
+ }
+ result = !!result;
+
+ var source,
+ details = {
+ module: config.current.module,
+ name: config.current.testName,
+ result: result,
+ message: msg
+ };
+
+ msg = escapeInnerText( msg || (result ? "okay" : "failed" ) );
+ msg = "<span class='test-message'>" + msg + "</span>";
+
+ if ( !result ) {
+ source = sourceFromStacktrace( 2 );
+ if ( source ) {
+ details.source = source;
+ msg += "<table><tr class='test-source'><th>Source: </th><td><pre>" + escapeInnerText( source ) + "</pre></td></tr></table>";
+ }
+ }
+ runLoggingCallbacks( "log", QUnit, details );
+ config.current.assertions.push({
+ result: result,
+ message: msg
+ });
+ },
+
+ /**
+ * Assert that the first two arguments are equal, with an optional message.
+ * Prints out both actual and expected values.
+ * @name equal
+ * @function
+ * @example equal( format( "Received {0} bytes.", 2), "Received 2 bytes.", "format() replaces {0} with next argument" );
+ */
+ equal: function( actual, expected, message ) {
+ QUnit.push( expected == actual, actual, expected, message );
+ },
+
+ /**
+ * @name notEqual
+ * @function
+ */
+ notEqual: function( actual, expected, message ) {
+ QUnit.push( expected != actual, actual, expected, message );
+ },
+
+ /**
+ * @name deepEqual
+ * @function
+ */
+ deepEqual: function( actual, expected, message ) {
+ QUnit.push( QUnit.equiv(actual, expected), actual, expected, message );
+ },
+
+ /**
+ * @name notDeepEqual
+ * @function
+ */
+ notDeepEqual: function( actual, expected, message ) {
+ QUnit.push( !QUnit.equiv(actual, expected), actual, expected, message );
+ },
+
+ /**
+ * @name strictEqual
+ * @function
+ */
+ strictEqual: function( actual, expected, message ) {
+ QUnit.push( expected === actual, actual, expected, message );
+ },
+
+ /**
+ * @name notStrictEqual
+ * @function
+ */
+ notStrictEqual: function( actual, expected, message ) {
+ QUnit.push( expected !== actual, actual, expected, message );
+ },
+
+ throws: function( block, expected, message ) {
+ var actual,
+ ok = false;
+
+ // 'expected' is optional
+ if ( typeof expected === "string" ) {
+ message = expected;
+ expected = null;
+ }
+
+ config.current.ignoreGlobalErrors = true;
+ try {
+ block.call( config.current.testEnvironment );
+ } catch (e) {
+ actual = e;
+ }
+ config.current.ignoreGlobalErrors = false;
+
+ if ( actual ) {
+ // we don't want to validate thrown error
+ if ( !expected ) {
+ ok = true;
+ // expected is a regexp
+ } else if ( QUnit.objectType( expected ) === "regexp" ) {
+ ok = expected.test( actual );
+ // expected is a constructor
+ } else if ( actual instanceof expected ) {
+ ok = true;
+ // expected is a validation function which returns true is validation passed
+ } else if ( expected.call( {}, actual ) === true ) {
+ ok = true;
+ }
+
+ QUnit.push( ok, actual, null, message );
+ } else {
+ QUnit.pushFailure( message, null, 'No exception was thrown.' );
+ }
+ }
+};
+
+/**
+ * @deprecate since 1.8.0
+ * Kept assertion helpers in root for backwards compatibility
+ */
+extend( QUnit, QUnit.assert );
+
+/**
+ * @deprecated since 1.9.0
+ * Kept global "raises()" for backwards compatibility
+ */
+QUnit.raises = QUnit.assert.throws;
+
+/**
+ * @deprecated since 1.0.0, replaced with error pushes since 1.3.0
+ * Kept to avoid TypeErrors for undefined methods.
+ */
+QUnit.equals = function() {
+ QUnit.push( false, false, false, "QUnit.equals has been deprecated since 2009 (e88049a0), use QUnit.equal instead" );
+};
+QUnit.same = function() {
+ QUnit.push( false, false, false, "QUnit.same has been deprecated since 2009 (e88049a0), use QUnit.deepEqual instead" );
+};
+
+// We want access to the constructor's prototype
+(function() {
+ function F() {}
+ F.prototype = QUnit;
+ QUnit = new F();
+ // Make F QUnit's constructor so that we can add to the prototype later
+ QUnit.constructor = F;
+}());
+
+/**
+ * Config object: Maintain internal state
+ * Later exposed as QUnit.config
+ * `config` initialized at top of scope
+ */
+config = {
+ // The queue of tests to run
+ queue: [],
+
+ // block until document ready
+ blocking: true,
+
+ // when enabled, show only failing tests
+ // gets persisted through sessionStorage and can be changed in UI via checkbox
+ hidepassed: false,
+
+ // by default, run previously failed tests first
+ // very useful in combination with "Hide passed tests" checked
+ reorder: true,
+
+ // by default, modify document.title when suite is done
+ altertitle: true,
+
+ // when enabled, all tests must call expect()
+ requireExpects: false,
+
+ // add checkboxes that are persisted in the query-string
+ // when enabled, the id is set to `true` as a `QUnit.config` property
+ urlConfig: [
+ {
+ id: "noglobals",
+ label: "Check for Globals",
+ tooltip: "Enabling this will test if any test introduces new properties on the `window` object. Stored as query-strings."
+ },
+ {
+ id: "notrycatch",
+ label: "No try-catch",
+ tooltip: "Enabling this will run tests outside of a try-catch block. Makes debugging exceptions in IE reasonable. Stored as query-strings."
+ }
+ ],
+
+ // Set of all modules.
+ modules: {},
+
+ // logging callback queues
+ begin: [],
+ done: [],
+ log: [],
+ testStart: [],
+ testDone: [],
+ moduleStart: [],
+ moduleDone: []
+};
+
+// Initialize more QUnit.config and QUnit.urlParams
+(function() {
+ var i,
+ location = window.location || { search: "", protocol: "file:" },
+ params = location.search.slice( 1 ).split( "&" ),
+ length = params.length,
+ urlParams = {},
+ current;
+
+ if ( params[ 0 ] ) {
+ for ( i = 0; i < length; i++ ) {
+ current = params[ i ].split( "=" );
+ current[ 0 ] = decodeURIComponent( current[ 0 ] );
+ // allow just a key to turn on a flag, e.g., test.html?noglobals
+ current[ 1 ] = current[ 1 ] ? decodeURIComponent( current[ 1 ] ) : true;
+ urlParams[ current[ 0 ] ] = current[ 1 ];
+ }
+ }
+
+ QUnit.urlParams = urlParams;
+
+ // String search anywhere in moduleName+testName
+ config.filter = urlParams.filter;
+
+ // Exact match of the module name
+ config.module = urlParams.module;
+
+ config.testNumber = parseInt( urlParams.testNumber, 10 ) || null;
+
+ // Figure out if we're running the tests from a server or not
+ QUnit.isLocal = location.protocol === "file:";
+}());
+
+// Export global variables, unless an 'exports' object exists,
+// in that case we assume we're in CommonJS (dealt with on the bottom of the script)
+if ( typeof exports === "undefined" ) {
+ extend( window, QUnit );
+
+ // Expose QUnit object
+ window.QUnit = QUnit;
+}
+
+// Extend QUnit object,
+// these after set here because they should not be exposed as global functions
+extend( QUnit, {
+ config: config,
+
+ // Initialize the configuration options
+ init: function() {
+ extend( config, {
+ stats: { all: 0, bad: 0 },
+ moduleStats: { all: 0, bad: 0 },
+ started: +new Date(),
+ updateRate: 1000,
+ blocking: false,
+ autostart: true,
+ autorun: false,
+ filter: "",
+ queue: [],
+ semaphore: 0
+ });
+
+ var tests, banner, result,
+ qunit = id( "qunit" );
+
+ if ( qunit ) {
+ qunit.innerHTML =
+ "<h1 id='qunit-header'>" + escapeInnerText( document.title ) + "</h1>" +
+ "<h2 id='qunit-banner'></h2>" +
+ "<div id='qunit-testrunner-toolbar'></div>" +
+ "<h2 id='qunit-userAgent'></h2>" +
+ "<ol id='qunit-tests'></ol>";
+ }
+
+ tests = id( "qunit-tests" );
+ banner = id( "qunit-banner" );
+ result = id( "qunit-testresult" );
+
+ if ( tests ) {
+ tests.innerHTML = "";
+ }
+
+ if ( banner ) {
+ banner.className = "";
+ }
+
+ if ( result ) {
+ result.parentNode.removeChild( result );
+ }
+
+ if ( tests ) {
+ result = document.createElement( "p" );
+ result.id = "qunit-testresult";
+ result.className = "result";
+ tests.parentNode.insertBefore( result, tests );
+ result.innerHTML = "Running...<br/>&nbsp;";
+ }
+ },
+
+ // Resets the test setup. Useful for tests that modify the DOM.
+ reset: function() {
+ var fixture = id( "qunit-fixture" );
+ if ( fixture ) {
+ fixture.innerHTML = config.fixture;
+ }
+ },
+
+ // Trigger an event on an element.
+ // @example triggerEvent( document.body, "click" );
+ triggerEvent: function( elem, type, event ) {
+ if ( document.createEvent ) {
+ event = document.createEvent( "MouseEvents" );
+ event.initMouseEvent(type, true, true, elem.ownerDocument.defaultView,
+ 0, 0, 0, 0, 0, false, false, false, false, 0, null);
+
+ elem.dispatchEvent( event );
+ } else if ( elem.fireEvent ) {
+ elem.fireEvent( "on" + type );
+ }
+ },
+
+ // Safe object type checking
+ is: function( type, obj ) {
+ return QUnit.objectType( obj ) == type;
+ },
+
+ objectType: function( obj ) {
+ if ( typeof obj === "undefined" ) {
+ return "undefined";
+ // consider: typeof null === object
+ }
+ if ( obj === null ) {
+ return "null";
+ }
+
+ var type = toString.call( obj ).match(/^\[object\s(.*)\]$/)[1] || "";
+
+ switch ( type ) {
+ case "Number":
+ if ( isNaN(obj) ) {
+ return "nan";
+ }
+ return "number";
+ case "String":
+ case "Boolean":
+ case "Array":
+ case "Date":
+ case "RegExp":
+ case "Function":
+ return type.toLowerCase();
+ }
+ if ( typeof obj === "object" ) {
+ return "object";
+ }
+ return undefined;
+ },
+
+ push: function( result, actual, expected, message ) {
+ if ( !config.current ) {
+ throw new Error( "assertion outside test context, was " + sourceFromStacktrace() );
+ }
+
+ var output, source,
+ details = {
+ module: config.current.module,
+ name: config.current.testName,
+ result: result,
+ message: message,
+ actual: actual,
+ expected: expected
+ };
+
+ message = escapeInnerText( message ) || ( result ? "okay" : "failed" );
+ message = "<span class='test-message'>" + message + "</span>";
+ output = message;
+
+ if ( !result ) {
+ expected = escapeInnerText( QUnit.jsDump.parse(expected) );
+ actual = escapeInnerText( QUnit.jsDump.parse(actual) );
+ output += "<table><tr class='test-expected'><th>Expected: </th><td><pre>" + expected + "</pre></td></tr>";
+
+ if ( actual != expected ) {
+ output += "<tr class='test-actual'><th>Result: </th><td><pre>" + actual + "</pre></td></tr>";
+ output += "<tr class='test-diff'><th>Diff: </th><td><pre>" + QUnit.diff( expected, actual ) + "</pre></td></tr>";
+ }
+
+ source = sourceFromStacktrace();
+
+ if ( source ) {
+ details.source = source;
+ output += "<tr class='test-source'><th>Source: </th><td><pre>" + escapeInnerText( source ) + "</pre></td></tr>";
+ }
+
+ output += "</table>";
+ }
+
+ runLoggingCallbacks( "log", QUnit, details );
+
+ config.current.assertions.push({
+ result: !!result,
+ message: output
+ });
+ },
+
+ pushFailure: function( message, source, actual ) {
+ if ( !config.current ) {
+ throw new Error( "pushFailure() assertion outside test context, was " + sourceFromStacktrace(2) );
+ }
+
+ var output,
+ details = {
+ module: config.current.module,
+ name: config.current.testName,
+ result: false,
+ message: message
+ };
+
+ message = escapeInnerText( message ) || "error";
+ message = "<span class='test-message'>" + message + "</span>";
+ output = message;
+
+ output += "<table>";
+
+ if ( actual ) {
+ output += "<tr class='test-actual'><th>Result: </th><td><pre>" + escapeInnerText( actual ) + "</pre></td></tr>";
+ }
+
+ if ( source ) {
+ details.source = source;
+ output += "<tr class='test-source'><th>Source: </th><td><pre>" + escapeInnerText( source ) + "</pre></td></tr>";
+ }
+
+ output += "</table>";
+
+ runLoggingCallbacks( "log", QUnit, details );
+
+ config.current.assertions.push({
+ result: false,
+ message: output
+ });
+ },
+
+ url: function( params ) {
+ params = extend( extend( {}, QUnit.urlParams ), params );
+ var key,
+ querystring = "?";
+
+ for ( key in params ) {
+ if ( !hasOwn.call( params, key ) ) {
+ continue;
+ }
+ querystring += encodeURIComponent( key ) + "=" +
+ encodeURIComponent( params[ key ] ) + "&";
+ }
+ return window.location.pathname + querystring.slice( 0, -1 );
+ },
+
+ extend: extend,
+ id: id,
+ addEvent: addEvent
+ // load, equiv, jsDump, diff: Attached later
+});
+
+/**
+ * @deprecated: Created for backwards compatibility with test runner that set the hook function
+ * into QUnit.{hook}, instead of invoking it and passing the hook function.
+ * QUnit.constructor is set to the empty F() above so that we can add to it's prototype here.
+ * Doing this allows us to tell if the following methods have been overwritten on the actual
+ * QUnit object.
+ */
+extend( QUnit.constructor.prototype, {
+
+ // Logging callbacks; all receive a single argument with the listed properties
+ // run test/logs.html for any related changes
+ begin: registerLoggingCallback( "begin" ),
+
+ // done: { failed, passed, total, runtime }
+ done: registerLoggingCallback( "done" ),
+
+ // log: { result, actual, expected, message }
+ log: registerLoggingCallback( "log" ),
+
+ // testStart: { name }
+ testStart: registerLoggingCallback( "testStart" ),
+
+ // testDone: { name, failed, passed, total }
+ testDone: registerLoggingCallback( "testDone" ),
+
+ // moduleStart: { name }
+ moduleStart: registerLoggingCallback( "moduleStart" ),
+
+ // moduleDone: { name, failed, passed, total }
+ moduleDone: registerLoggingCallback( "moduleDone" )
+});
+
+if ( typeof document === "undefined" || document.readyState === "complete" ) {
+ config.autorun = true;
+}
+
+QUnit.load = function() {
+ runLoggingCallbacks( "begin", QUnit, {} );
+
+ // Initialize the config, saving the execution queue
+ var banner, filter, i, label, len, main, ol, toolbar, userAgent, val, urlConfigCheckboxes, moduleFilter,
+ numModules = 0,
+ moduleFilterHtml = "",
+ urlConfigHtml = "",
+ oldconfig = extend( {}, config );
+
+ QUnit.init();
+ extend(config, oldconfig);
+
+ config.blocking = false;
+
+ len = config.urlConfig.length;
+
+ for ( i = 0; i < len; i++ ) {
+ val = config.urlConfig[i];
+ if ( typeof val === "string" ) {
+ val = {
+ id: val,
+ label: val,
+ tooltip: "[no tooltip available]"
+ };
+ }
+ config[ val.id ] = QUnit.urlParams[ val.id ];
+ urlConfigHtml += "<input id='qunit-urlconfig-" + val.id + "' name='" + val.id + "' type='checkbox'" + ( config[ val.id ] ? " checked='checked'" : "" ) + " title='" + val.tooltip + "'><label for='qunit-urlconfig-" + val.id + "' title='" + val.tooltip + "'>" + val.label + "</label>";
+ }
+
+ moduleFilterHtml += "<label for='qunit-modulefilter'>Module: </label><select id='qunit-modulefilter' name='modulefilter'><option value='' " + ( config.module === undefined ? "selected" : "" ) + ">< All Modules ></option>";
+ for ( i in config.modules ) {
+ if ( config.modules.hasOwnProperty( i ) ) {
+ numModules += 1;
+ moduleFilterHtml += "<option value='" + encodeURIComponent(i) + "' " + ( config.module === i ? "selected" : "" ) + ">" + i + "</option>";
+ }
+ }
+ moduleFilterHtml += "</select>";
+
+ // `userAgent` initialized at top of scope
+ userAgent = id( "qunit-userAgent" );
+ if ( userAgent ) {
+ userAgent.innerHTML = navigator.userAgent;
+ }
+
+ // `banner` initialized at top of scope
+ banner = id( "qunit-header" );
+ if ( banner ) {
+ banner.innerHTML = "<a href='" + QUnit.url({ filter: undefined, module: undefined, testNumber: undefined }) + "'>" + banner.innerHTML + "</a> ";
+ }
+
+ // `toolbar` initialized at top of scope
+ toolbar = id( "qunit-testrunner-toolbar" );
+ if ( toolbar ) {
+ // `filter` initialized at top of scope
+ filter = document.createElement( "input" );
+ filter.type = "checkbox";
+ filter.id = "qunit-filter-pass";
+
+ addEvent( filter, "click", function() {
+ var tmp,
+ ol = document.getElementById( "qunit-tests" );
+
+ if ( filter.checked ) {
+ ol.className = ol.className + " hidepass";
+ } else {
+ tmp = " " + ol.className.replace( /[\n\t\r]/g, " " ) + " ";
+ ol.className = tmp.replace( / hidepass /, " " );
+ }
+ if ( defined.sessionStorage ) {
+ if (filter.checked) {
+ sessionStorage.setItem( "qunit-filter-passed-tests", "true" );
+ } else {
+ sessionStorage.removeItem( "qunit-filter-passed-tests" );
+ }
+ }
+ });
+
+ if ( config.hidepassed || defined.sessionStorage && sessionStorage.getItem( "qunit-filter-passed-tests" ) ) {
+ filter.checked = true;
+ // `ol` initialized at top of scope
+ ol = document.getElementById( "qunit-tests" );
+ ol.className = ol.className + " hidepass";
+ }
+ toolbar.appendChild( filter );
+
+ // `label` initialized at top of scope
+ label = document.createElement( "label" );
+ label.setAttribute( "for", "qunit-filter-pass" );
+ label.setAttribute( "title", "Only show tests and assertons that fail. Stored in sessionStorage." );
+ label.innerHTML = "Hide passed tests";
+ toolbar.appendChild( label );
+
+ urlConfigCheckboxes = document.createElement( 'span' );
+ urlConfigCheckboxes.innerHTML = urlConfigHtml;
+ addEvent( urlConfigCheckboxes, "change", function( event ) {
+ var params = {};
+ params[ event.target.name ] = event.target.checked ? true : undefined;
+ window.location = QUnit.url( params );
+ });
+ toolbar.appendChild( urlConfigCheckboxes );
+
+ if (numModules > 1) {
+ moduleFilter = document.createElement( 'span' );
+ moduleFilter.setAttribute( 'id', 'qunit-modulefilter-container' );
+ moduleFilter.innerHTML = moduleFilterHtml;
+ addEvent( moduleFilter, "change", function() {
+ var selectBox = moduleFilter.getElementsByTagName("select")[0],
+ selectedModule = decodeURIComponent(selectBox.options[selectBox.selectedIndex].value);
+
+ window.location = QUnit.url( { module: ( selectedModule === "" ) ? undefined : selectedModule } );
+ });
+ toolbar.appendChild(moduleFilter);
+ }
+ }
+
+ // `main` initialized at top of scope
+ main = id( "qunit-fixture" );
+ if ( main ) {
+ config.fixture = main.innerHTML;
+ }
+
+ if ( config.autostart ) {
+ QUnit.start();
+ }
+};
+
+addEvent( window, "load", QUnit.load );
+
+// `onErrorFnPrev` initialized at top of scope
+// Preserve other handlers
+onErrorFnPrev = window.onerror;
+
+// Cover uncaught exceptions
+// Returning true will surpress the default browser handler,
+// returning false will let it run.
+window.onerror = function ( error, filePath, linerNr ) {
+ var ret = false;
+ if ( onErrorFnPrev ) {
+ ret = onErrorFnPrev( error, filePath, linerNr );
+ }
+
+ // Treat return value as window.onerror itself does,
+ // Only do our handling if not surpressed.
+ if ( ret !== true ) {
+ if ( QUnit.config.current ) {
+ if ( QUnit.config.current.ignoreGlobalErrors ) {
+ return true;
+ }
+ QUnit.pushFailure( error, filePath + ":" + linerNr );
+ } else {
+ QUnit.test( "global failure", extend( function() {
+ QUnit.pushFailure( error, filePath + ":" + linerNr );
+ }, { validTest: validTest } ) );
+ }
+ return false;
+ }
+
+ return ret;
+};
+
+function done() {
+ config.autorun = true;
+
+ // Log the last module results
+ if ( config.currentModule ) {
+ runLoggingCallbacks( "moduleDone", QUnit, {
+ name: config.currentModule,
+ failed: config.moduleStats.bad,
+ passed: config.moduleStats.all - config.moduleStats.bad,
+ total: config.moduleStats.all
+ });
+ }
+
+ var i, key,
+ banner = id( "qunit-banner" ),
+ tests = id( "qunit-tests" ),
+ runtime = +new Date() - config.started,
+ passed = config.stats.all - config.stats.bad,
+ html = [
+ "Tests completed in ",
+ runtime,
+ " milliseconds.<br/>",
+ "<span class='passed'>",
+ passed,
+ "</span> tests of <span class='total'>",
+ config.stats.all,
+ "</span> passed, <span class='failed'>",
+ config.stats.bad,
+ "</span> failed."
+ ].join( "" );
+
+ if ( banner ) {
+ banner.className = ( config.stats.bad ? "qunit-fail" : "qunit-pass" );
+ }
+
+ if ( tests ) {
+ id( "qunit-testresult" ).innerHTML = html;
+ }
+
+ if ( config.altertitle && typeof document !== "undefined" && document.title ) {
+ // show ✖ for good, ✔ for bad suite result in title
+ // use escape sequences in case file gets loaded with non-utf-8-charset
+ document.title = [
+ ( config.stats.bad ? "\u2716" : "\u2714" ),
+ document.title.replace( /^[\u2714\u2716] /i, "" )
+ ].join( " " );
+ }
+
+ // clear own sessionStorage items if all tests passed
+ if ( config.reorder && defined.sessionStorage && config.stats.bad === 0 ) {
+ // `key` & `i` initialized at top of scope
+ for ( i = 0; i < sessionStorage.length; i++ ) {
+ key = sessionStorage.key( i++ );
+ if ( key.indexOf( "qunit-test-" ) === 0 ) {
+ sessionStorage.removeItem( key );
+ }
+ }
+ }
+
+ // scroll back to top to show results
+ if ( window.scrollTo ) {
+ window.scrollTo(0, 0);
+ }
+
+ runLoggingCallbacks( "done", QUnit, {
+ failed: config.stats.bad,
+ passed: passed,
+ total: config.stats.all,
+ runtime: runtime
+ });
+}
+
+/** @return Boolean: true if this test should be ran */
+function validTest( test ) {
+ var include,
+ filter = config.filter && config.filter.toLowerCase(),
+ module = config.module && config.module.toLowerCase(),
+ fullName = (test.module + ": " + test.testName).toLowerCase();
+
+ // Internally-generated tests are always valid
+ if ( test.callback && test.callback.validTest === validTest ) {
+ delete test.callback.validTest;
+ return true;
+ }
+
+ if ( config.testNumber ) {
+ return test.testNumber === config.testNumber;
+ }
+
+ if ( module && ( !test.module || test.module.toLowerCase() !== module ) ) {
+ return false;
+ }
+
+ if ( !filter ) {
+ return true;
+ }
+
+ include = filter.charAt( 0 ) !== "!";
+ if ( !include ) {
+ filter = filter.slice( 1 );
+ }
+
+ // If the filter matches, we need to honour include
+ if ( fullName.indexOf( filter ) !== -1 ) {
+ return include;
+ }
+
+ // Otherwise, do the opposite
+ return !include;
+}
+
+// so far supports only Firefox, Chrome and Opera (buggy), Safari (for real exceptions)
+// Later Safari and IE10 are supposed to support error.stack as well
+// See also https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error/Stack
+function extractStacktrace( e, offset ) {
+ offset = offset === undefined ? 3 : offset;
+
+ var stack, include, i, regex;
+
+ if ( e.stacktrace ) {
+ // Opera
+ return e.stacktrace.split( "\n" )[ offset + 3 ];
+ } else if ( e.stack ) {
+ // Firefox, Chrome
+ stack = e.stack.split( "\n" );
+ if (/^error$/i.test( stack[0] ) ) {
+ stack.shift();
+ }
+ if ( fileName ) {
+ include = [];
+ for ( i = offset; i < stack.length; i++ ) {
+ if ( stack[ i ].indexOf( fileName ) != -1 ) {
+ break;
+ }
+ include.push( stack[ i ] );
+ }
+ if ( include.length ) {
+ return include.join( "\n" );
+ }
+ }
+ return stack[ offset ];
+ } else if ( e.sourceURL ) {
+ // Safari, PhantomJS
+ // hopefully one day Safari provides actual stacktraces
+ // exclude useless self-reference for generated Error objects
+ if ( /qunit.js$/.test( e.sourceURL ) ) {
+ return;
+ }
+ // for actual exceptions, this is useful
+ return e.sourceURL + ":" + e.line;
+ }
+}
+function sourceFromStacktrace( offset ) {
+ try {
+ throw new Error();
+ } catch ( e ) {
+ return extractStacktrace( e, offset );
+ }
+}
+
+function escapeInnerText( s ) {
+ if ( !s ) {
+ return "";
+ }
+ s = s + "";
+ return s.replace( /[\&<>]/g, function( s ) {
+ switch( s ) {
+ case "&": return "&amp;";
+ case "<": return "&lt;";
+ case ">": return "&gt;";
+ default: return s;
+ }
+ });
+}
+
+function synchronize( callback, last ) {
+ config.queue.push( callback );
+
+ if ( config.autorun && !config.blocking ) {
+ process( last );
+ }
+}
+
+function process( last ) {
+ function next() {
+ process( last );
+ }
+ var start = new Date().getTime();
+ config.depth = config.depth ? config.depth + 1 : 1;
+
+ while ( config.queue.length && !config.blocking ) {
+ if ( !defined.setTimeout || config.updateRate <= 0 || ( ( new Date().getTime() - start ) < config.updateRate ) ) {
+ config.queue.shift()();
+ } else {
+ window.setTimeout( next, 13 );
+ break;
+ }
+ }
+ config.depth--;
+ if ( last && !config.blocking && !config.queue.length && config.depth === 0 ) {
+ done();
+ }
+}
+
+function saveGlobal() {
+ config.pollution = [];
+
+ if ( config.noglobals ) {
+ for ( var key in window ) {
+ // in Opera sometimes DOM element ids show up here, ignore them
+ if ( !hasOwn.call( window, key ) || /^qunit-test-output/.test( key ) ) {
+ continue;
+ }
+ config.pollution.push( key );
+ }
+ }
+}
+
+function checkPollution( name ) {
+ var newGlobals,
+ deletedGlobals,
+ old = config.pollution;
+
+ saveGlobal();
+
+ newGlobals = diff( config.pollution, old );
+ if ( newGlobals.length > 0 ) {
+ QUnit.pushFailure( "Introduced global variable(s): " + newGlobals.join(", ") );
+ }
+
+ deletedGlobals = diff( old, config.pollution );
+ if ( deletedGlobals.length > 0 ) {
+ QUnit.pushFailure( "Deleted global variable(s): " + deletedGlobals.join(", ") );
+ }
+}
+
+// returns a new Array with the elements that are in a but not in b
+function diff( a, b ) {
+ var i, j,
+ result = a.slice();
+
+ for ( i = 0; i < result.length; i++ ) {
+ for ( j = 0; j < b.length; j++ ) {
+ if ( result[i] === b[j] ) {
+ result.splice( i, 1 );
+ i--;
+ break;
+ }
+ }
+ }
+ return result;
+}
+
+function extend( a, b ) {
+ for ( var prop in b ) {
+ if ( b[ prop ] === undefined ) {
+ delete a[ prop ];
+
+ // Avoid "Member not found" error in IE8 caused by setting window.constructor
+ } else if ( prop !== "constructor" || a !== window ) {
+ a[ prop ] = b[ prop ];
+ }
+ }
+
+ return a;
+}
+
+function addEvent( elem, type, fn ) {
+ if ( elem.addEventListener ) {
+ elem.addEventListener( type, fn, false );
+ } else if ( elem.attachEvent ) {
+ elem.attachEvent( "on" + type, fn );
+ } else {
+ fn();
+ }
+}
+
+function id( name ) {
+ return !!( typeof document !== "undefined" && document && document.getElementById ) &&
+ document.getElementById( name );
+}
+
+function registerLoggingCallback( key ) {
+ return function( callback ) {
+ config[key].push( callback );
+ };
+}
+
+// Supports deprecated method of completely overwriting logging callbacks
+function runLoggingCallbacks( key, scope, args ) {
+ //debugger;
+ var i, callbacks;
+ if ( QUnit.hasOwnProperty( key ) ) {
+ QUnit[ key ].call(scope, args );
+ } else {
+ callbacks = config[ key ];
+ for ( i = 0; i < callbacks.length; i++ ) {
+ callbacks[ i ].call( scope, args );
+ }
+ }
+}
+
+// Test for equality any JavaScript type.
+// Author: Philippe Rathé <prathe@gmail.com>
+QUnit.equiv = (function() {
+
+ // Call the o related callback with the given arguments.
+ function bindCallbacks( o, callbacks, args ) {
+ var prop = QUnit.objectType( o );
+ if ( prop ) {
+ if ( QUnit.objectType( callbacks[ prop ] ) === "function" ) {
+ return callbacks[ prop ].apply( callbacks, args );
+ } else {
+ return callbacks[ prop ]; // or undefined
+ }
+ }
+ }
+
+ // the real equiv function
+ var innerEquiv,
+ // stack to decide between skip/abort functions
+ callers = [],
+ // stack to avoiding loops from circular referencing
+ parents = [],
+
+ getProto = Object.getPrototypeOf || function ( obj ) {
+ return obj.__proto__;
+ },
+ callbacks = (function () {
+
+ // for string, boolean, number and null
+ function useStrictEquality( b, a ) {
+ if ( b instanceof a.constructor || a instanceof b.constructor ) {
+ // to catch short annotaion VS 'new' annotation of a
+ // declaration
+ // e.g. var i = 1;
+ // var j = new Number(1);
+ return a == b;
+ } else {
+ return a === b;
+ }
+ }
+
+ return {
+ "string": useStrictEquality,
+ "boolean": useStrictEquality,
+ "number": useStrictEquality,
+ "null": useStrictEquality,
+ "undefined": useStrictEquality,
+
+ "nan": function( b ) {
+ return isNaN( b );
+ },
+
+ "date": function( b, a ) {
+ return QUnit.objectType( b ) === "date" && a.valueOf() === b.valueOf();
+ },
+
+ "regexp": function( b, a ) {
+ return QUnit.objectType( b ) === "regexp" &&
+ // the regex itself
+ a.source === b.source &&
+ // and its modifers
+ a.global === b.global &&
+ // (gmi) ...
+ a.ignoreCase === b.ignoreCase &&
+ a.multiline === b.multiline &&
+ a.sticky === b.sticky;
+ },
+
+ // - skip when the property is a method of an instance (OOP)
+ // - abort otherwise,
+ // initial === would have catch identical references anyway
+ "function": function() {
+ var caller = callers[callers.length - 1];
+ return caller !== Object && typeof caller !== "undefined";
+ },
+
+ "array": function( b, a ) {
+ var i, j, len, loop;
+
+ // b could be an object literal here
+ if ( QUnit.objectType( b ) !== "array" ) {
+ return false;
+ }
+
+ len = a.length;
+ if ( len !== b.length ) {
+ // safe and faster
+ return false;
+ }
+
+ // track reference to avoid circular references
+ parents.push( a );
+ for ( i = 0; i < len; i++ ) {
+ loop = false;
+ for ( j = 0; j < parents.length; j++ ) {
+ if ( parents[j] === a[i] ) {
+ loop = true;// dont rewalk array
+ }
+ }
+ if ( !loop && !innerEquiv(a[i], b[i]) ) {
+ parents.pop();
+ return false;
+ }
+ }
+ parents.pop();
+ return true;
+ },
+
+ "object": function( b, a ) {
+ var i, j, loop,
+ // Default to true
+ eq = true,
+ aProperties = [],
+ bProperties = [];
+
+ // comparing constructors is more strict than using
+ // instanceof
+ if ( a.constructor !== b.constructor ) {
+ // Allow objects with no prototype to be equivalent to
+ // objects with Object as their constructor.
+ if ( !(( getProto(a) === null && getProto(b) === Object.prototype ) ||
+ ( getProto(b) === null && getProto(a) === Object.prototype ) ) ) {
+ return false;
+ }
+ }
+
+ // stack constructor before traversing properties
+ callers.push( a.constructor );
+ // track reference to avoid circular references
+ parents.push( a );
+
+ for ( i in a ) { // be strict: don't ensures hasOwnProperty
+ // and go deep
+ loop = false;
+ for ( j = 0; j < parents.length; j++ ) {
+ if ( parents[j] === a[i] ) {
+ // don't go down the same path twice
+ loop = true;
+ }
+ }
+ aProperties.push(i); // collect a's properties
+
+ if (!loop && !innerEquiv( a[i], b[i] ) ) {
+ eq = false;
+ break;
+ }
+ }
+
+ callers.pop(); // unstack, we are done
+ parents.pop();
+
+ for ( i in b ) {
+ bProperties.push( i ); // collect b's properties
+ }
+
+ // Ensures identical properties name
+ return eq && innerEquiv( aProperties.sort(), bProperties.sort() );
+ }
+ };
+ }());
+
+ innerEquiv = function() { // can take multiple arguments
+ var args = [].slice.apply( arguments );
+ if ( args.length < 2 ) {
+ return true; // end transition
+ }
+
+ return (function( a, b ) {
+ if ( a === b ) {
+ return true; // catch the most you can
+ } else if ( a === null || b === null || typeof a === "undefined" ||
+ typeof b === "undefined" ||
+ QUnit.objectType(a) !== QUnit.objectType(b) ) {
+ return false; // don't lose time with error prone cases
+ } else {
+ return bindCallbacks(a, callbacks, [ b, a ]);
+ }
+
+ // apply transition with (1..n) arguments
+ }( args[0], args[1] ) && arguments.callee.apply( this, args.splice(1, args.length - 1 )) );
+ };
+
+ return innerEquiv;
+}());
+
+/**
+ * jsDump Copyright (c) 2008 Ariel Flesler - aflesler(at)gmail(dot)com |
+ * http://flesler.blogspot.com Licensed under BSD
+ * (http://www.opensource.org/licenses/bsd-license.php) Date: 5/15/2008
+ *
+ * @projectDescription Advanced and extensible data dumping for Javascript.
+ * @version 1.0.0
+ * @author Ariel Flesler
+ * @link {http://flesler.blogspot.com/2008/05/jsdump-pretty-dump-of-any-javascript.html}
+ */
+QUnit.jsDump = (function() {
+ function quote( str ) {
+ return '"' + str.toString().replace( /"/g, '\\"' ) + '"';
+ }
+ function literal( o ) {
+ return o + "";
+ }
+ function join( pre, arr, post ) {
+ var s = jsDump.separator(),
+ base = jsDump.indent(),
+ inner = jsDump.indent(1);
+ if ( arr.join ) {
+ arr = arr.join( "," + s + inner );
+ }
+ if ( !arr ) {
+ return pre + post;
+ }
+ return [ pre, inner + arr, base + post ].join(s);
+ }
+ function array( arr, stack ) {
+ var i = arr.length, ret = new Array(i);
+ this.up();
+ while ( i-- ) {
+ ret[i] = this.parse( arr[i] , undefined , stack);
+ }
+ this.down();
+ return join( "[", ret, "]" );
+ }
+
+ var reName = /^function (\w+)/,
+ jsDump = {
+ parse: function( obj, type, stack ) { //type is used mostly internally, you can fix a (custom)type in advance
+ stack = stack || [ ];
+ var inStack, res,
+ parser = this.parsers[ type || this.typeOf(obj) ];
+
+ type = typeof parser;
+ inStack = inArray( obj, stack );
+
+ if ( inStack != -1 ) {
+ return "recursion(" + (inStack - stack.length) + ")";
+ }
+ //else
+ if ( type == "function" ) {
+ stack.push( obj );
+ res = parser.call( this, obj, stack );
+ stack.pop();
+ return res;
+ }
+ // else
+ return ( type == "string" ) ? parser : this.parsers.error;
+ },
+ typeOf: function( obj ) {
+ var type;
+ if ( obj === null ) {
+ type = "null";
+ } else if ( typeof obj === "undefined" ) {
+ type = "undefined";
+ } else if ( QUnit.is( "regexp", obj) ) {
+ type = "regexp";
+ } else if ( QUnit.is( "date", obj) ) {
+ type = "date";
+ } else if ( QUnit.is( "function", obj) ) {
+ type = "function";
+ } else if ( typeof obj.setInterval !== undefined && typeof obj.document !== "undefined" && typeof obj.nodeType === "undefined" ) {
+ type = "window";
+ } else if ( obj.nodeType === 9 ) {
+ type = "document";
+ } else if ( obj.nodeType ) {
+ type = "node";
+ } else if (
+ // native arrays
+ toString.call( obj ) === "[object Array]" ||
+ // NodeList objects
+ ( typeof obj.length === "number" && typeof obj.item !== "undefined" && ( obj.length ? obj.item(0) === obj[0] : ( obj.item( 0 ) === null && typeof obj[0] === "undefined" ) ) )
+ ) {
+ type = "array";
+ } else {
+ type = typeof obj;
+ }
+ return type;
+ },
+ separator: function() {
+ return this.multiline ? this.HTML ? "<br />" : "\n" : this.HTML ? "&nbsp;" : " ";
+ },
+ indent: function( extra ) {// extra can be a number, shortcut for increasing-calling-decreasing
+ if ( !this.multiline ) {
+ return "";
+ }
+ var chr = this.indentChar;
+ if ( this.HTML ) {
+ chr = chr.replace( /\t/g, " " ).replace( / /g, "&nbsp;" );
+ }
+ return new Array( this._depth_ + (extra||0) ).join(chr);
+ },
+ up: function( a ) {
+ this._depth_ += a || 1;
+ },
+ down: function( a ) {
+ this._depth_ -= a || 1;
+ },
+ setParser: function( name, parser ) {
+ this.parsers[name] = parser;
+ },
+ // The next 3 are exposed so you can use them
+ quote: quote,
+ literal: literal,
+ join: join,
+ //
+ _depth_: 1,
+ // This is the list of parsers, to modify them, use jsDump.setParser
+ parsers: {
+ window: "[Window]",
+ document: "[Document]",
+ error: "[ERROR]", //when no parser is found, shouldn"t happen
+ unknown: "[Unknown]",
+ "null": "null",
+ "undefined": "undefined",
+ "function": function( fn ) {
+ var ret = "function",
+ name = "name" in fn ? fn.name : (reName.exec(fn) || [])[1];//functions never have name in IE
+
+ if ( name ) {
+ ret += " " + name;
+ }
+ ret += "( ";
+
+ ret = [ ret, QUnit.jsDump.parse( fn, "functionArgs" ), "){" ].join( "" );
+ return join( ret, QUnit.jsDump.parse(fn,"functionCode" ), "}" );
+ },
+ array: array,
+ nodelist: array,
+ "arguments": array,
+ object: function( map, stack ) {
+ var ret = [ ], keys, key, val, i;
+ QUnit.jsDump.up();
+ if ( Object.keys ) {
+ keys = Object.keys( map );
+ } else {
+ keys = [];
+ for ( key in map ) {
+ keys.push( key );
+ }
+ }
+ keys.sort();
+ for ( i = 0; i < keys.length; i++ ) {
+ key = keys[ i ];
+ val = map[ key ];
+ ret.push( QUnit.jsDump.parse( key, "key" ) + ": " + QUnit.jsDump.parse( val, undefined, stack ) );
+ }
+ QUnit.jsDump.down();
+ return join( "{", ret, "}" );
+ },
+ node: function( node ) {
+ var a, val,
+ open = QUnit.jsDump.HTML ? "&lt;" : "<",
+ close = QUnit.jsDump.HTML ? "&gt;" : ">",
+ tag = node.nodeName.toLowerCase(),
+ ret = open + tag;
+
+ for ( a in QUnit.jsDump.DOMAttrs ) {
+ val = node[ QUnit.jsDump.DOMAttrs[a] ];
+ if ( val ) {
+ ret += " " + a + "=" + QUnit.jsDump.parse( val, "attribute" );
+ }
+ }
+ return ret + close + open + "/" + tag + close;
+ },
+ functionArgs: function( fn ) {//function calls it internally, it's the arguments part of the function
+ var args,
+ l = fn.length;
+
+ if ( !l ) {
+ return "";
+ }
+
+ args = new Array(l);
+ while ( l-- ) {
+ args[l] = String.fromCharCode(97+l);//97 is 'a'
+ }
+ return " " + args.join( ", " ) + " ";
+ },
+ key: quote, //object calls it internally, the key part of an item in a map
+ functionCode: "[code]", //function calls it internally, it's the content of the function
+ attribute: quote, //node calls it internally, it's an html attribute value
+ string: quote,
+ date: quote,
+ regexp: literal, //regex
+ number: literal,
+ "boolean": literal
+ },
+ DOMAttrs: {
+ //attributes to dump from nodes, name=>realName
+ id: "id",
+ name: "name",
+ "class": "className"
+ },
+ HTML: false,//if true, entities are escaped ( <, >, \t, space and \n )
+ indentChar: " ",//indentation unit
+ multiline: true //if true, items in a collection, are separated by a \n, else just a space.
+ };
+
+ return jsDump;
+}());
+
+// from Sizzle.js
+function getText( elems ) {
+ var i, elem,
+ ret = "";
+
+ for ( i = 0; elems[i]; i++ ) {
+ elem = elems[i];
+
+ // Get the text from text nodes and CDATA nodes
+ if ( elem.nodeType === 3 || elem.nodeType === 4 ) {
+ ret += elem.nodeValue;
+
+ // Traverse everything else, except comment nodes
+ } else if ( elem.nodeType !== 8 ) {
+ ret += getText( elem.childNodes );
+ }
+ }
+
+ return ret;
+}
+
+// from jquery.js
+function inArray( elem, array ) {
+ if ( array.indexOf ) {
+ return array.indexOf( elem );
+ }
+
+ for ( var i = 0, length = array.length; i < length; i++ ) {
+ if ( array[ i ] === elem ) {
+ return i;
+ }
+ }
+
+ return -1;
+}
+
+/*
+ * Javascript Diff Algorithm
+ * By John Resig (http://ejohn.org/)
+ * Modified by Chu Alan "sprite"
+ *
+ * Released under the MIT license.
+ *
+ * More Info:
+ * http://ejohn.org/projects/javascript-diff-algorithm/
+ *
+ * Usage: QUnit.diff(expected, actual)
+ *
+ * QUnit.diff( "the quick brown fox jumped over", "the quick fox jumps over" ) == "the quick <del>brown </del> fox <del>jumped </del><ins>jumps </ins> over"
+ */
+QUnit.diff = (function() {
+ function diff( o, n ) {
+ var i,
+ ns = {},
+ os = {};
+
+ for ( i = 0; i < n.length; i++ ) {
+ if ( ns[ n[i] ] == null ) {
+ ns[ n[i] ] = {
+ rows: [],
+ o: null
+ };
+ }
+ ns[ n[i] ].rows.push( i );
+ }
+
+ for ( i = 0; i < o.length; i++ ) {
+ if ( os[ o[i] ] == null ) {
+ os[ o[i] ] = {
+ rows: [],
+ n: null
+ };
+ }
+ os[ o[i] ].rows.push( i );
+ }
+
+ for ( i in ns ) {
+ if ( !hasOwn.call( ns, i ) ) {
+ continue;
+ }
+ if ( ns[i].rows.length == 1 && typeof os[i] != "undefined" && os[i].rows.length == 1 ) {
+ n[ ns[i].rows[0] ] = {
+ text: n[ ns[i].rows[0] ],
+ row: os[i].rows[0]
+ };
+ o[ os[i].rows[0] ] = {
+ text: o[ os[i].rows[0] ],
+ row: ns[i].rows[0]
+ };
+ }
+ }
+
+ for ( i = 0; i < n.length - 1; i++ ) {
+ if ( n[i].text != null && n[ i + 1 ].text == null && n[i].row + 1 < o.length && o[ n[i].row + 1 ].text == null &&
+ n[ i + 1 ] == o[ n[i].row + 1 ] ) {
+
+ n[ i + 1 ] = {
+ text: n[ i + 1 ],
+ row: n[i].row + 1
+ };
+ o[ n[i].row + 1 ] = {
+ text: o[ n[i].row + 1 ],
+ row: i + 1
+ };
+ }
+ }
+
+ for ( i = n.length - 1; i > 0; i-- ) {
+ if ( n[i].text != null && n[ i - 1 ].text == null && n[i].row > 0 && o[ n[i].row - 1 ].text == null &&
+ n[ i - 1 ] == o[ n[i].row - 1 ]) {
+
+ n[ i - 1 ] = {
+ text: n[ i - 1 ],
+ row: n[i].row - 1
+ };
+ o[ n[i].row - 1 ] = {
+ text: o[ n[i].row - 1 ],
+ row: i - 1
+ };
+ }
+ }
+
+ return {
+ o: o,
+ n: n
+ };
+ }
+
+ return function( o, n ) {
+ o = o.replace( /\s+$/, "" );
+ n = n.replace( /\s+$/, "" );
+
+ var i, pre,
+ str = "",
+ out = diff( o === "" ? [] : o.split(/\s+/), n === "" ? [] : n.split(/\s+/) ),
+ oSpace = o.match(/\s+/g),
+ nSpace = n.match(/\s+/g);
+
+ if ( oSpace == null ) {
+ oSpace = [ " " ];
+ }
+ else {
+ oSpace.push( " " );
+ }
+
+ if ( nSpace == null ) {
+ nSpace = [ " " ];
+ }
+ else {
+ nSpace.push( " " );
+ }
+
+ if ( out.n.length === 0 ) {
+ for ( i = 0; i < out.o.length; i++ ) {
+ str += "<del>" + out.o[i] + oSpace[i] + "</del>";
+ }
+ }
+ else {
+ if ( out.n[0].text == null ) {
+ for ( n = 0; n < out.o.length && out.o[n].text == null; n++ ) {
+ str += "<del>" + out.o[n] + oSpace[n] + "</del>";
+ }
+ }
+
+ for ( i = 0; i < out.n.length; i++ ) {
+ if (out.n[i].text == null) {
+ str += "<ins>" + out.n[i] + nSpace[i] + "</ins>";
+ }
+ else {
+ // `pre` initialized at top of scope
+ pre = "";
+
+ for ( n = out.n[i].row + 1; n < out.o.length && out.o[n].text == null; n++ ) {
+ pre += "<del>" + out.o[n] + oSpace[n] + "</del>";
+ }
+ str += " " + out.n[i].text + nSpace[i] + pre;
+ }
+ }
+ }
+
+ return str;
+ };
+}());
+
+// for CommonJS enviroments, export everything
+if ( typeof exports !== "undefined" ) {
+ extend(exports, QUnit);
+}
+
+// get at whatever the global object is, like window in browsers
+}( (function() {return this;}.call()) ));