You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by mw...@apache.org on 2012/07/13 08:15:41 UTC
[3/14] git commit: Add spec helper.
Add spec helper.
Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/commit/22fa9055
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/tree/22fa9055
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/diff/22fa9055
Branch: refs/heads/hello-cordova
Commit: 22fa90553e1174c64e8928d89ea6f126085709e2
Parents: 233d995
Author: Michael Brooks <mi...@michaelbrooks.ca>
Authored: Thu Jul 12 23:04:09 2012 -0700
Committer: Michael Brooks <mi...@michaelbrooks.ca>
Committed: Thu Jul 12 23:04:09 2012 -0700
----------------------------------------------------------------------
www/spec/helper.js | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/22fa9055/www/spec/helper.js
----------------------------------------------------------------------
diff --git a/www/spec/helper.js b/www/spec/helper.js
new file mode 100644
index 0000000..3bc58a8
--- /dev/null
+++ b/www/spec/helper.js
@@ -0,0 +1,11 @@
+beforeEach(function() {
+ document.getElementById('stage').innerHTML = '';
+});
+
+var helper = {
+ trigger: function(obj, name) {
+ var e = document.createEvent('Event');
+ e.initEvent(name, true, true);
+ obj.dispatchEvent(e);
+ }
+};