diff options
author | kkimlabs@chromium.org <kkimlabs@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-13 19:17:45 +0000 |
---|---|---|
committer | kkimlabs@chromium.org <kkimlabs@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-13 19:17:45 +0000 |
commit | 000f38d28bfb42de889b650a1e9079f0a70f0fd3 (patch) | |
tree | f35b06d93b792594f3cde8896e24ae9ae9132ffe | |
parent | dfa030ed82108b6c2c08f77633d52421679828e6 (diff) | |
download | chromium_src-000f38d28bfb42de889b650a1e9079f0a70f0fd3.zip chromium_src-000f38d28bfb42de889b650a1e9079f0a70f0fd3.tar.gz chromium_src-000f38d28bfb42de889b650a1e9079f0a70f0fd3.tar.bz2 |
[Android] minor assertWaitForPageScaleFactor function clean up.
We had three implementations of assertWaitForPageScaleFactor* which are identical.
Make it use one that is in ContentShellTestBase.java.
Review URL: https://chromiumcodereview.appspot.com/22798009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217305 0039d316-1c4b-4281-b951-d872f2087c98
2 files changed, 2 insertions, 22 deletions
diff --git a/content/public/android/javatests/src/org/chromium/content/browser/ContentViewScrollingTest.java b/content/public/android/javatests/src/org/chromium/content/browser/ContentViewScrollingTest.java index d880a96..998f036 100644 --- a/content/public/android/javatests/src/org/chromium/content/browser/ContentViewScrollingTest.java +++ b/content/public/android/javatests/src/org/chromium/content/browser/ContentViewScrollingTest.java @@ -26,15 +26,6 @@ public class ContentViewScrollingTest extends ContentShellTestBase { "<body>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</body>" + "</html>"); - private void assertWaitForPageScaleFactor(final float scale) throws InterruptedException { - assertTrue(CriteriaHelper.pollForCriteria(new Criteria() { - @Override - public boolean isSatisfied() { - return getContentViewCore().getScale() == scale; - } - })); - } - private void assertWaitForScroll(final boolean hugLeft, final boolean hugTop) throws InterruptedException { assertTrue(CriteriaHelper.pollForCriteria(new Criteria() { @@ -79,7 +70,7 @@ public class ContentViewScrollingTest extends ContentShellTestBase { launchContentShellWithUrl(LARGE_PAGE); assertTrue("Page failed to load", waitForActiveShellToBeDoneLoading()); - assertWaitForPageScaleFactor(1.0f); + assertWaitForPageScaleFactorMatch(1.0f); assertEquals(0, getContentViewCore().getNativeScrollXForTest()); assertEquals(0, getContentViewCore().getNativeScrollYForTest()); diff --git a/content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java b/content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java index a12007f..e4c1a5f 100644 --- a/content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java +++ b/content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java @@ -61,7 +61,7 @@ public class ImeTest extends ContentShellTestBase { mContentView = getActivity().getActiveContentView(); mCallbackContainer = new TestCallbackHelperContainer(mContentView); // TODO(aurimas) remove this wait once crbug.com/179511 is fixed. - assertWaitForPageScaleFactor(1); + assertWaitForPageScaleFactorMatch(1); DOMUtils.clickNode(this, mContentView, mCallbackContainer, "input_text"); assertWaitForKeyboardStatus(true); @@ -286,17 +286,6 @@ public class ImeTest extends ContentShellTestBase { }); } - - - private void assertWaitForPageScaleFactor(final float scale) throws InterruptedException { - assertTrue(CriteriaHelper.pollForCriteria(new Criteria() { - @Override - public boolean isSatisfied() { - return getContentViewCore().getScale() == scale; - } - })); - } - private void assertWaitForKeyboardStatus(final boolean show) throws InterruptedException { assertTrue(CriteriaHelper.pollForCriteria(new Criteria() { @Override |