summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2018-03-07 15:44:47 -0800
committerMinh Nguyễn <mxn@1ec5.org>2018-03-07 15:44:47 -0800
commita53f1a807ec956c4a4ec2c32b907cf85daa36932 (patch)
tree586551cc5916d8c850911e9d3c129e83fedffdf1
parentdfa871d0df38c1da97e456ee635da3f76407ea15 (diff)
downloadqtlocation-mapboxgl-upstream/1ec5-macos-srgb-11289.tar.gz
[macos] Test only SRGB colorupstream/1ec5-macos-srgb-11289
-rw-r--r--platform/darwin/test/MGLTileSetTests.mm6
1 files changed, 4 insertions, 2 deletions
diff --git a/platform/darwin/test/MGLTileSetTests.mm b/platform/darwin/test/MGLTileSetTests.mm
index 9b74e45db2..0a721a1528 100644
--- a/platform/darwin/test/MGLTileSetTests.mm
+++ b/platform/darwin/test/MGLTileSetTests.mm
@@ -67,11 +67,13 @@
MGLAttributionInfo *mapboxInfo = [[MGLAttributionInfo alloc] initWithTitle:[[NSAttributedString alloc] initWithString:@"Mapbox"]
URL:[NSURL URLWithString:@"https://www.mapbox.com/"]];
MGLColor *redColor = [MGLColor redColor];
-#if !TARGET_OS_IPHONE
+#if TARGET_OS_IPHONE
+ 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.
- redColor = [redColor colorUsingColorSpace:[NSColorSpace sRGBColorSpace]];
+ redColor = [NSColor colorWithSRGBRed:1 green:0 blue:0 alpha:1];
#endif
NSAttributedString *gl = [[NSAttributedString alloc] initWithString:@"GL" attributes:@{
NSBackgroundColorAttributeName: redColor,