Remove nativeImage deprecated methods (#11978)

* remove deprecated nativeimage methods

* remove .only from spec
This commit is contained in:
shelley vohr 2018-02-20 10:15:27 -05:00 committed by Charles Kerr
parent 98ba120ae2
commit a2856db982
2 changed files with 1 additions and 7 deletions

View file

@ -583,10 +583,7 @@ void NativeImage::BuildPrototype(
.SetMethod("resize", &NativeImage::Resize)
.SetMethod("crop", &NativeImage::Crop)
.SetMethod("getAspectRatio", &NativeImage::GetAspectRatio)
.SetMethod("addRepresentation", &NativeImage::AddRepresentation)
// TODO(kevinsawicki): Remove in 2.0, deprecate before then with warnings
.SetMethod("toPng", &NativeImage::ToPNG)
.SetMethod("toJpeg", &NativeImage::ToJPEG);
.SetMethod("addRepresentation", &NativeImage::AddRepresentation);
}
} // namespace api

View file

@ -162,9 +162,6 @@ describe('nativeImage module', () => {
const imageI = nativeImage.createFromBuffer(imageA.toBitmap(),
{width: 538, height: 190, scaleFactor: 2.0})
expect(imageI.getSize()).to.deep.equal({width: 269, height: 95})
const imageJ = nativeImage.createFromBuffer(imageA.toPNG(), 2.0)
expect(imageJ.getSize()).to.deep.equal({width: 269, height: 95})
})
})