mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 03:36:44 +02:00
[SVGPreview]Handle comments properly (#28863)
* [SVGPreview] Handle comments properly * f: spelling * f: add tolerance to the bitmap eq test * f: remove bitmap eq testing, since it doesn't work on CI for some reason * f: parsing issue
This commit is contained in:
@@ -4,14 +4,12 @@
|
||||
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.InteropServices.ComTypes;
|
||||
using System.Text;
|
||||
using Common.ComInterlop;
|
||||
using Microsoft.PowerToys.STATestExtension;
|
||||
using Microsoft.PowerToys.ThumbnailHandler.Svg;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Moq;
|
||||
|
||||
namespace SvgThumbnailProviderUnitTests
|
||||
{
|
||||
@@ -211,5 +209,17 @@ namespace SvgThumbnailProviderUnitTests
|
||||
|
||||
Assert.IsTrue(bitmap != null);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void SvgCommentsAreHandledCorrectly()
|
||||
{
|
||||
var filePath = "HelperFiles/WithComments.svg";
|
||||
|
||||
SvgThumbnailProvider svgThumbnailProvider = new SvgThumbnailProvider(filePath);
|
||||
|
||||
Bitmap bitmap = svgThumbnailProvider.GetThumbnail(8);
|
||||
|
||||
Assert.IsTrue(bitmap != null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user