Add integration test for synthetic pinch gestures

This CL adds a layout test that uses gpuBenchmarking.pinchBy and
verifies its effects. This requires an addition of an explicit setSize
on Android's WebContents. This is because the layout tests on Android
start the browser process' main loop on the UI thread so the Android
Views framework never gets to layout. Without this, the RenderWidget
appears to have 0x0 size and calling pinchBy fails.

This was split out from https://crrev.com/c/784213

Bug: 610021
Change-Id: Ibf9a262833a18f9d1f34769c12f14cdfdb9a4c80
Reviewed-on: https://chromium-review.googlesource.com/834398
Reviewed-by: Dirk Pranke <[email protected]>
Reviewed-by: Peter Beverloo <[email protected]>
Reviewed-by: Timothy Dresser <[email protected]>
Commit-Queue: David Bokan <[email protected]>
Cr-Commit-Position: refs/heads/master@{#525780}
diff --git a/content/shell/browser/shell_android.cc b/content/shell/browser/shell_android.cc
index 9ca2b93aa..c61a333 100644
--- a/content/shell/browser/shell_android.cc
+++ b/content/shell/browser/shell_android.cc
@@ -68,6 +68,12 @@
   // Not needed; subviews are bound.
 }
 
+void Shell::SizeTo(const gfx::Size& content_size) {
+  JNIEnv* env = AttachCurrentThread();
+  Java_Shell_sizeTo(env, java_object_, content_size.width(),
+                    content_size.height());
+}
+
 void Shell::PlatformSetTitle(const base::string16& title) {
   NOTIMPLEMENTED() << ": " << title;
 }