hunk.code_window: var RxOld = require('rx');
   var RxNew = require('../../../../index');
   module.exports = function (suite) {
     var oldWindowCountWithCurrentThreadScheduler = RxOld.Observable.range(0, 25, RxOld.Scheduler.currentThread).windowWithCount(5);
     var newWindowCountWithCurrentThreadScheduler = RxNew.Observable.range(0, 25).windowCount(5);
     function _next(x) { }
     function _error(e) { }
  
hunk.labels: keep keep keep keep keep replace keep keep keep
hunk.after_edit:   var newWindowCountWithCurrentThreadScheduler = RxNew.Observable.range(0, 25, RxNew.Scheduler.queue).windowCount(5);
  
hunk.file_path: perf/micro/current-thread-scheduler/operators/windowcount.js
hunk.type: replace
file: /* globals describe, it, expect */
  var Rx = require('../../dist/cjs/Rx');
  var Observable = Rx.Observable;
  
  describe('Observable.fromEvent', function () {
    it('should setup an event observable on objects with "on" and "off" ', function () {
      var onEventName;
      var onHandler;
      var offEventName;
      var offHandler;
      var obj = {
        on: function (a, b) {
          onEventName = a;
          onHandler = b;
        },
        off: function (a, b) {
          offEventName = a;
          offHandler = b;
        }
      };
  
      var subscription = Observable.fromEvent(obj, 'click')
        .subscribe(function () { });
  
      subscription.unsubscribe();
  
      expect(onEventName).toBe('click');
      expect(typeof onHandler).toBe('function');
      expect(offEventName).toBe(onEventName);
      expect(offHandler).toBe(onHandler);
    });
  
    it('should setup an event observable on objects with "addEventListener" and "removeEventListener" ', function () {
      var onEventName;
      var onHandler;
      var offEventName;
      var offHandler;
      var obj = {
        addEventListener: function (a, b) {
          onEventName = a;
          onHandler = b;
        },
        removeEventListener: function (a, b) {
          offEventName = a;
          offHandler = b;
        }
      };
  
      var subscription = Observable.fromEvent(obj, 'click')
        .subscribe(function () { });
  
      subscription.unsubscribe();
  
      expect(onEventName).toBe('click');
      expect(typeof onHandler).toBe('function');
      expect(offEventName).toBe(onEventName);
      expect(offHandler).toBe(onHandler);
    });
  
    it('should setup an event observable on objects with "addListener" and "removeListener" ', function () {
      var onEventName;
      var onHandler;
      var offEventName;
      var offHandler;
      var obj = {
        addListener: function (a, b) {
          onEventName = a;
          onHandler = b;
        },
        removeListener: function (a, b) {
          offEventName = a;
          offHandler = b;
        }
      };
  
      var subscription = Observable.fromEvent(obj, 'click')
        .subscribe(function () { });
  
      subscription.unsubscribe();
  
      expect(onEventName).toBe('click');
      expect(typeof onHandler).toBe('function');
      expect(offEventName).toBe(onEventName);
      expect(offHandler).toBe(onHandler);
    });
  
    it('should pass through events that occur', function (done) {
      var send;
      var obj = {
        on: function (name, handler) {
          send = handler;
        },
        off: function () {
        }
      };
  
      Observable.fromEvent(obj, 'click').take(1)
        .subscribe(function (e) {
          expect(e).toBe('test');
        }, function (err) {
          done.fail('should not be called');
        }, done);
  
      send('test');
    });
  
    it('should pass through events that occur and use the selector if provided', function (done) {
      var send;
      var obj = {
        on: function (name, handler) {
          send = handler;
        },
        off: function () {
        }
      };
  
      function selector(x) {
        return x + '!';
      }
  
      Observable.fromEvent(obj, 'click', selector).take(1)
        .subscribe(function (e) {
          expect(e).toBe('test!');
        }, function (err) {
          done.fail('should not be called');
        }, done);
  
      send('test');
    });
  });