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

Side by Side Diff: content/test/layouttest_support.cc

Issue 2898583002: color: Fix color not being reset between layout tests (Closed)
Patch Set: Review feedbakc Created 3 years, 7 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
« no previous file with comments | « content/renderer/render_widget.cc ('k') | ui/gfx/icc_profile.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/public/test/layouttest_support.h" 5 #include "content/public/test/layouttest_support.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 490
491 gfx::ICCProfile GetTestingICCProfile(const std::string& name) { 491 gfx::ICCProfile GetTestingICCProfile(const std::string& name) {
492 if (name == "genericRGB") { 492 if (name == "genericRGB") {
493 return gfx::ICCProfileForTestingGenericRGB(); 493 return gfx::ICCProfileForTestingGenericRGB();
494 } else if (name == "sRGB") { 494 } else if (name == "sRGB") {
495 return gfx::ICCProfileForTestingSRGB(); 495 return gfx::ICCProfileForTestingSRGB();
496 } else if (name == "test" || name == "colorSpin") { 496 } else if (name == "test" || name == "colorSpin") {
497 return gfx::ICCProfileForTestingColorSpin(); 497 return gfx::ICCProfileForTestingColorSpin();
498 } else if (name == "adobeRGB") { 498 } else if (name == "adobeRGB") {
499 return gfx::ICCProfileForTestingAdobeRGB(); 499 return gfx::ICCProfileForTestingAdobeRGB();
500 } else if (name == "reset") {
501 return gfx::ICCProfileForLayoutTests();
500 } 502 }
501 return gfx::ICCProfile(); 503 return gfx::ICCProfile();
502 } 504 }
503 505
504 void SetDeviceColorProfile( 506 void SetDeviceColorProfile(
505 RenderView* render_view, const gfx::ICCProfile& icc_profile) { 507 RenderView* render_view, const gfx::ICCProfile& icc_profile) {
506 static_cast<RenderViewImpl*>(render_view)-> 508 static_cast<RenderViewImpl*>(render_view)->
507 SetDeviceColorProfileForTesting(icc_profile); 509 SetDeviceColorProfileForTesting(icc_profile);
508 } 510 }
509 511
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 } 600 }
599 } 601 }
600 602
601 bool IsNavigationInitiatedByRenderer(const blink::WebURLRequest& request) { 603 bool IsNavigationInitiatedByRenderer(const blink::WebURLRequest& request) {
602 RequestExtraData* extra_data = 604 RequestExtraData* extra_data =
603 static_cast<RequestExtraData*>(request.GetExtraData()); 605 static_cast<RequestExtraData*>(request.GetExtraData());
604 return extra_data && extra_data->navigation_initiated_by_renderer(); 606 return extra_data && extra_data->navigation_initiated_by_renderer();
605 } 607 }
606 608
607 } // namespace content 609 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_widget.cc ('k') | ui/gfx/icc_profile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698