Add RenderView ResetDeviceColorProfileForTesting
Provide a method to reset the device color profile for tests, and
make TestRunner call it prior to each layout test.
This to reset the Page color profile to its default state, to let
Page choose the default color profile, rather than TestRunner.
BUG=369787,368663
Review URL: https://codereview.chromium.org/561453004
Cr-Commit-Position: refs/heads/master@{#295097}
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index d9f620d5..8cf0ae0 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -1659,6 +1659,12 @@
return true;
}
+void RenderWidget::ResetDeviceColorProfileForTesting() {
+ if (!device_color_profile_.empty())
+ device_color_profile_.clear();
+ device_color_profile_.push_back('0');
+}
+
void RenderWidget::OnOrientationChange() {
}