From a2856db982fea11dd91836ae52449cfd20021fc9 Mon Sep 17 00:00:00 2001 From: shelley vohr Date: Tue, 20 Feb 2018 10:15:27 -0500 Subject: [PATCH] Remove nativeImage deprecated methods (#11978) * remove deprecated nativeimage methods * remove .only from spec --- atom/common/api/atom_api_native_image.cc | 5 +---- spec/api-native-image-spec.js | 3 --- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/atom/common/api/atom_api_native_image.cc b/atom/common/api/atom_api_native_image.cc index 05e6e4501ffa..fe3ba33412bb 100644 --- a/atom/common/api/atom_api_native_image.cc +++ b/atom/common/api/atom_api_native_image.cc @@ -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 diff --git a/spec/api-native-image-spec.js b/spec/api-native-image-spec.js index 2b61fda68c8a..87399921ff14 100644 --- a/spec/api-native-image-spec.js +++ b/spec/api-native-image-spec.js @@ -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}) }) })