[LayoutTests] Enable OOPIF pixel dumps behind a flag.

This patch enables OOPIF pixel dumps behind a flag. The reason for the
flag is that this isn't working for 100% of cases yet. Specifically,
selection rects and dialogs windows aren't being captured correctly.

As well, there seem to be some pixel differences between existings tests
which will likely need to be rebaselined.

R=lukasza@chromium.org

Bug: 667551
Change-Id: Icfb98958e5b9d007b1bd3a554b32d55d545e04e6
Reviewed-on: https://chromium-review.googlesource.com/994240
Commit-Queue: vmpstr <vmpstr@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Ken Rockot <rockot@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: Ɓukasz Anforowicz <lukasza@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#551487}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d29618cbc8e36bfbb85992f31089c10e4c52c7fb
diff --git a/public/cpp/bindings/sync_call_restrictions.h b/public/cpp/bindings/sync_call_restrictions.h
index e31d442..bdd6f82 100644
--- a/public/cpp/bindings/sync_call_restrictions.h
+++ b/public/cpp/bindings/sync_call_restrictions.h
@@ -21,6 +21,10 @@
 class PrefServiceSyncable;
 }
 
+namespace content {
+class BlinkTestController;
+}
+
 namespace display {
 class ForwardingDisplayDelegate;
 }
@@ -84,6 +88,8 @@
   // For destroying the GL context/surface that draw to a platform window before
   // the platform window is destroyed.
   friend class viz::HostFrameSinkManager;
+  // Allow for layout test pixel dumps.
+  friend class content::BlinkTestController;
   // END ALLOWED USAGE.
 
   // BEGIN USAGE THAT NEEDS TO BE FIXED.