Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1421)

Unified Diff: content/shell/renderer/layout_test/layout_test_content_renderer_client.cc

Issue 2226733003: Color: Clean up color profile handling for layout tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master2
Patch Set: Update TODOs Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 020333a3fe54fe28b77acedd5bd85d7a59e5599d..de021a50026b45a10cde7fc8ef1452dfcc92c4e4 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
@@ -33,6 +33,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;
@@ -226,6 +227,20 @@ LayoutTestContentRendererClient::CreateMediaStreamRendererFactory() {
#endif
}
+std::unique_ptr<gfx::ICCProfile>
+LayoutTestContentRendererClient::GetImageDecodeColorProfile() {
+ // TODO(ccameron): Make all platforms use the same color profile for layout
+ // tests.
+#if defined(OS_WIN)
+ return nullptr;
+#elif defined(OS_MACOSX)
+ return base::WrapUnique(new gfx::ICCProfile(gfx::ICCProfile::FromCGColorSpace(
+ CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB))));
+#else
+ return base::WrapUnique(new gfx::ICCProfile());
+#endif
+}
+
void LayoutTestContentRendererClient::DidInitializeWorkerContextOnWorkerThread(
v8::Local<v8::Context> context) {
blink::WebTestingSupport::injectInternalsObject(context);

Powered by Google App Engine
This is Rietveld 408576698