| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package org.chromium.chrome.browser; | 5 package org.chromium.chrome.browser; |
| 6 | 6 |
| 7 import android.graphics.Rect; | 7 import android.graphics.Rect; |
| 8 import android.support.test.filters.MediumTest; |
| 8 import android.test.MoreAsserts; | 9 import android.test.MoreAsserts; |
| 9 import android.test.suitebuilder.annotation.MediumTest; | |
| 10 | 10 |
| 11 import org.chromium.base.ThreadUtils; | 11 import org.chromium.base.ThreadUtils; |
| 12 import org.chromium.base.test.util.CommandLineFlags; | 12 import org.chromium.base.test.util.CommandLineFlags; |
| 13 import org.chromium.base.test.util.RetryOnFailure; | 13 import org.chromium.base.test.util.RetryOnFailure; |
| 14 import org.chromium.base.test.util.UrlUtils; | 14 import org.chromium.base.test.util.UrlUtils; |
| 15 import org.chromium.chrome.test.ChromeActivityTestCaseBase; | 15 import org.chromium.chrome.test.ChromeActivityTestCaseBase; |
| 16 import org.chromium.content.browser.ContentViewCore; | 16 import org.chromium.content.browser.ContentViewCore; |
| 17 import org.chromium.content.browser.test.util.Criteria; | 17 import org.chromium.content.browser.test.util.Criteria; |
| 18 import org.chromium.content.browser.test.util.CriteriaHelper; | 18 import org.chromium.content.browser.test.util.CriteriaHelper; |
| 19 import org.chromium.content.browser.test.util.DOMUtils; | 19 import org.chromium.content.browser.test.util.DOMUtils; |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 int priorHeight = (int) (viewportHeightBeforeCss * cssToDevicePi
xFactor); | 157 int priorHeight = (int) (viewportHeightBeforeCss * cssToDevicePi
xFactor); |
| 158 int afterHeightPlusKeyboard = | 158 int afterHeightPlusKeyboard = |
| 159 (int) (viewportHeightAfterCss * cssToDevicePixFactor) +
keyboardHeight; | 159 (int) (viewportHeightAfterCss * cssToDevicePixFactor) +
keyboardHeight; |
| 160 updateFailureReason("Values [" + priorHeight + "], [" + afterHei
ghtPlusKeyboard | 160 updateFailureReason("Values [" + priorHeight + "], [" + afterHei
ghtPlusKeyboard |
| 161 + "] did not match within allowed error range [" + ERROR
_EPS_PIX + "]"); | 161 + "] did not match within allowed error range [" + ERROR
_EPS_PIX + "]"); |
| 162 return almostEqual(priorHeight, afterHeightPlusKeyboard); | 162 return almostEqual(priorHeight, afterHeightPlusKeyboard); |
| 163 } | 163 } |
| 164 }); | 164 }); |
| 165 } | 165 } |
| 166 } | 166 } |
| OLD | NEW |