summaryrefslogtreecommitdiff
path: root/tests/test_globals.js
diff options
context:
space:
mode:
authorAlon Levy <alon@pobox.com>2014-10-26 12:24:11 +0200
committerAlon Levy <alon@pobox.com>2014-10-26 12:27:50 +0200
commit07373747c7e709cadbe73dd024a11b8336034f6d (patch)
tree4a28da0f5bb938f355047713d2547022afacd1ab /tests/test_globals.js
parent9e7c7ddc7de091d404e83efbab113f35ebde2b77 (diff)
tests: forgot some more files
Diffstat (limited to 'tests/test_globals.js')
-rw-r--r--tests/test_globals.js30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/test_globals.js b/tests/test_globals.js
new file mode 100644
index 00000000..afd79ecf
--- /dev/null
+++ b/tests/test_globals.js
@@ -0,0 +1,30 @@
+var base = require('./base');
+var util = require('../scripts/util');
+
+var count;
+
+function object_length(obj) {
+ var count = 0;
+ for (var k in obj) {
+ count += 1;
+ }
+ return count;
+}
+
+var win_before;
+var win_after;
+
+base.run_tests({
+ created: function(errors, window) {
+ count = object_length(window);
+ console.log('before fields count: ' + count);
+ win_before = util.set_from_object(window);
+ },
+ done:function (errors, window) {
+ var new_count = object_length(window);
+ console.log('after fields count: ' + new_count);
+ console.log('new fields count: ' + (new_count - count));
+ win_after = util.set_from_object(window);
+ console.log(util.set_diff(win_after, win_before).a_b.join(','));
+ }
+});