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

Side by Side Diff: content/shell/renderer/layout_test/layout_test_content_renderer_client.cc

Issue 2299193005: Layout tests: Parameterize color space to use by default (Closed)
Patch Set: Actually specify generic 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/shell/renderer/layout_test/layout_test_content_renderer_client .h" 5 #include "content/shell/renderer/layout_test/layout_test_content_renderer_client .h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/debugger.h" 9 #include "base/debug/debugger.h"
10 #include "components/test_runner/mock_credential_manager_client.h" 10 #include "components/test_runner/mock_credential_manager_client.h"
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 #else 225 #else
226 return nullptr; 226 return nullptr;
227 #endif 227 #endif
228 } 228 }
229 229
230 std::unique_ptr<gfx::ICCProfile> 230 std::unique_ptr<gfx::ICCProfile>
231 LayoutTestContentRendererClient::GetImageDecodeColorProfile() { 231 LayoutTestContentRendererClient::GetImageDecodeColorProfile() {
232 // TODO(ccameron): Make all platforms use the same color profile for layout 232 // TODO(ccameron): Make all platforms use the same color profile for layout
233 // tests. 233 // tests.
234 #if defined(OS_WIN) 234 #if defined(OS_WIN)
235 return nullptr; 235 return base::WrapUnique(new gfx::ICCProfile(
236 GetTestingICCProfile("sRGB")));
236 #elif defined(OS_MACOSX) 237 #elif defined(OS_MACOSX)
237 return base::WrapUnique(new gfx::ICCProfile(gfx::ICCProfile::FromCGColorSpace( 238 return base::WrapUnique(new gfx::ICCProfile(
238 CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB)))); 239 GetTestingICCProfile("genericRGB")));
239 #else 240 #else
240 return base::WrapUnique(new gfx::ICCProfile()); 241 return base::WrapUnique(new gfx::ICCProfile());
241 #endif 242 #endif
242 } 243 }
243 244
244 void LayoutTestContentRendererClient::DidInitializeWorkerContextOnWorkerThread( 245 void LayoutTestContentRendererClient::DidInitializeWorkerContextOnWorkerThread(
245 v8::Local<v8::Context> context) { 246 v8::Local<v8::Context> context) {
246 blink::WebTestingSupport::injectInternalsObject(context); 247 blink::WebTestingSupport::injectInternalsObject(context);
247 } 248 }
248 249
249 } // namespace content 250 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/renderer/layout_test/blink_test_runner.cc ('k') | content/test/layouttest_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698