summaryrefslogtreecommitdiff
path: root/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/canvas/qunit-canvas.js
diff options
context:
space:
mode:
authorYaco <franco@reevo.org>2020-06-04 11:01:00 -0300
committerYaco <franco@reevo.org>2020-06-04 11:01:00 -0300
commitfc7369835258467bf97eb64f184b93691f9a9fd5 (patch)
treedaabd60089d2dd76d9f5fb416b005fbe159c799d /www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/canvas/qunit-canvas.js
first commit
Diffstat (limited to 'www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/canvas/qunit-canvas.js')
-rw-r--r--www/crm/wp-content/plugins/civicrm/civicrm/bower_components/qunit/addons/canvas/qunit-canvas.js6
1 files changed, 6 insertions, 0 deletions
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);
+ }
+});