diff options
| author | Alon Levy <alon@pobox.com> | 2014-12-16 17:37:42 +0200 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2014-12-16 17:37:42 +0200 |
| commit | ade19de410e0a789a921ec1666b278b2a64176d6 (patch) | |
| tree | c4c54b106de93609ca7bb70a20fd4be696715dbe /src/client-tests/test_globals.js | |
| parent | c7d026b1d504323a8c61d51b726e5e8d2337fc4b (diff) | |
moving files around after repository merger
Diffstat (limited to 'src/client-tests/test_globals.js')
| -rw-r--r-- | src/client-tests/test_globals.js | 30 |
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(',')); + } +}); |
