Deflake WebViewZoomTest (multiple callbacks per zoomBy)

Multiple calls to zoomBy in a short space of time can cause us to
receive multiple callbacks from WebView on the subsequent calls within
floating point error range and this will lead to the following kind of
failure:

  AssertionError: Expected new scale < current scale when zooming out
      Expected: a value less than <4.9F>
      but: <4.9000006F> was greater than <4.9F>

The next event after this will be the one we actually want and the test
will pass as expected if we wait for it.

Change-Id: I960d609ac95ede273faaa64a454e98f3d7eee9f2
Test: atest WebViewZoomTest
Fix: 165515726
diff --git a/tests/tests/webkit/src/android/webkit/cts/WebViewZoomTest.java b/tests/tests/webkit/src/android/webkit/cts/WebViewZoomTest.java
index b426764..1eed020 100644
--- a/tests/tests/webkit/src/android/webkit/cts/WebViewZoomTest.java
+++ b/tests/tests/webkit/src/android/webkit/cts/WebViewZoomTest.java
@@ -328,6 +328,13 @@
             ScaleChangedState state = waitForNextScaleChange();
             assertEquals(currentScale, state.mOldScale);
 
+
+            // Zoom scale changes can come in multiple steps and the initial scale may have
+            // conversion errors. Wait for the first significant scale change.
+            while (Math.abs(state.mNewScale - state.mOldScale) < PAGE_SCALE_EPSILON) {
+                state = waitForNextScaleChange();
+            }
+
             // Check that we zoomed in the expected direction wrt. the current scale.
             if (scaleAmount > 1.0f) {
                 assertThat(