From a0c7b2d72c2fd87c87ecba8356e885e97abec615 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguye=CC=82=CC=83n?= Date: Mon, 24 Feb 2020 22:34:28 -0800 Subject: [PATCH] [macos] Fixed attribution round-tripping test AppKit incorrectly uses calibrated RGB when exporting HTML, so input calibrated RGB to ensure round-tripping. --- platform/darwin/test/MGLTileSetTests.mm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/platform/darwin/test/MGLTileSetTests.mm b/platform/darwin/test/MGLTileSetTests.mm index 65e096ae7..68f27a8b0 100644 --- a/platform/darwin/test/MGLTileSetTests.mm +++ b/platform/darwin/test/MGLTileSetTests.mm @@ -69,10 +69,11 @@ #if TARGET_OS_IPHONE UIColor *redColor = [UIColor redColor]; #else - // CSS uses the sRGB color space. In macOS 10.12 Sierra and below, - // -[NSColor redColor] is in the calibrated RGB space and has a slightly - // different sRGB value than on iOS and macOS 10.13 High Sierra. - NSColor *redColor = [NSColor colorWithSRGBRed:1 green:0 blue:0 alpha:1]; + // CSS uses the sRGB color space. + // AppKit incorrectly uses calibrated RGB when exporting HTML, so input + // calibrated RGB to ensure round-tripping. + // + NSColor *redColor = [NSColor colorWithCalibratedRed:1 green:0 blue:0 alpha:1]; #endif NSAttributedString *gl = [[NSAttributedString alloc] initWithString:@"GL" attributes:@{ NSBackgroundColorAttributeName: redColor,