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

Unified Diff: content/public/test/browser_test_base.cc

Issue 2941393002: color: Force an sRGB color space for browser tests (Closed)
Patch Set: Just the switch bit Created 3 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/browser_test_base.cc
diff --git a/content/public/test/browser_test_base.cc b/content/public/test/browser_test_base.cc
index e956f2d6b0c002423d133e1a82675f7991768319..f4e1e08511625ff4f678057479bef4014dab7648 100644
--- a/content/public/test/browser_test_base.cc
+++ b/content/public/test/browser_test_base.cc
@@ -41,6 +41,7 @@
#include "ui/base/platform_window_defaults.h"
#include "ui/base/test/material_design_controller_test_api.h"
#include "ui/compositor/compositor_switches.h"
+#include "ui/gfx/color_space_switches.h"
#include "ui/gl/gl_implementation.h"
#include "ui/gl/gl_switches.h"
@@ -224,6 +225,10 @@ void BrowserTestBase::SetUp() {
if (use_software_gl && !use_software_compositing_)
command_line->AppendSwitch(switches::kOverrideUseSoftwareGLForTests);
+ // Use an sRGB color profile to ensure that the machine's color profile does
+ // not affect the results.
+ command_line->AppendSwitchASCII(switches::kForceColorProfile, "srgb");
+
test_host_resolver_ = base::MakeUnique<TestHostResolver>();
ContentBrowserSanityChecker scoped_enable_sanity_checks;
@@ -238,6 +243,7 @@ void BrowserTestBase::SetUp() {
base::FeatureList::GetInstance()->GetFeatureOverrides(&enabled_features,
&disabled_features);
}
+
if (!enabled_features.empty()) {
command_line->AppendSwitchASCII(switches::kEnableFeatures,
enabled_features);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698