Index: content/shell/renderer/layout_test/layout_test_content_renderer_client.cc |
diff --git a/content/shell/renderer/layout_test/layout_test_content_renderer_client.cc b/content/shell/renderer/layout_test/layout_test_content_renderer_client.cc |
index ff84acfacde0f8630afd26ceac9d388018fba5b1..aea2192eb0911d1de0a6a17768d1843ded49076a 100644 |
--- a/content/shell/renderer/layout_test/layout_test_content_renderer_client.cc |
+++ b/content/shell/renderer/layout_test/layout_test_content_renderer_client.cc |
@@ -32,6 +32,7 @@ |
#include "third_party/WebKit/public/web/WebPluginParams.h" |
#include "third_party/WebKit/public/web/WebTestingSupport.h" |
#include "third_party/WebKit/public/web/WebView.h" |
+#include "ui/gfx/icc_profile.h" |
#include "v8/include/v8.h" |
using blink::WebAudioDevice; |
@@ -203,6 +204,22 @@ LayoutTestContentRendererClient::CreateMediaStreamRendererFactory() { |
#endif |
} |
+std::unique_ptr<gfx::ICCProfile> |
+LayoutTestContentRendererClient::GetImageDecodeColorProfile() { |
ccameron
2016/08/09 07:11:08
An alternative TODO here would be to change all pl
hubbe
2016/08/09 16:59:54
Why is it that the code behaves differently when y
Dirk Pranke
2016/08/09 20:32:31
Yup, I'd say that's the right thing to do, so mayb
|
+#if defined(OS_WIN) |
+ // TODO(ccameron): Find out what color profile is currently preset on Windows |
+ // test machines, and return that here. |
+ return nullptr; |
+#elif defined(OS_MACOSX) |
+ // Layout tests on Mac expect a generic RGB color profile. |
+ return base::WrapUnique(new gfx::ICCProfile(gfx::ICCProfile::FromCGColorSpace( |
+ CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB)))); |
+#else |
+ // All other platforms expect no color profile to have been specified. |
+ return base::WrapUnique(new gfx::ICCProfile()); |
+#endif |
+} |
+ |
void LayoutTestContentRendererClient::DidInitializeWorkerContextOnWorkerThread( |
v8::Local<v8::Context> context) { |
blink::WebTestingSupport::injectInternalsObject(context); |