jasmine.Popup trimHeight reduces height if there is not enough space on the center (from jasmine.specs)