summaryrefslogtreecommitdiff
path: root/src/client-tests/test_globals.js
diff options
context:
space:
mode:
authorAlon Levy <alon@pobox.com>2014-12-16 17:37:42 +0200
committerAlon Levy <alon@pobox.com>2014-12-16 17:37:42 +0200
commitade19de410e0a789a921ec1666b278b2a64176d6 (patch)
treec4c54b106de93609ca7bb70a20fd4be696715dbe /src/client-tests/test_globals.js
parentc7d026b1d504323a8c61d51b726e5e8d2337fc4b (diff)
moving files around after repository merger
Diffstat (limited to 'src/client-tests/test_globals.js')
-rw-r--r--src/client-tests/test_globals.js30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/client-tests/test_globals.js b/src/client-tests/test_globals.js
new file mode 100644
index 00000000..03dd1cf9
--- /dev/null
+++ b/src/client-tests/test_globals.js
@@ -0,0 +1,30 @@
+var base = require('./base');
+var util = require('../src/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(','));
+ }
+});