Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3171)

Unified Diff: content/shell/android/javatests/src/org/chromium/content_shell_apk/ContentShellTestBase.java

Issue 21044008: [Android] Add selection handle tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/android/javatests/src/org/chromium/content/browser/input/SelectionHandleTest.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/android/javatests/src/org/chromium/content_shell_apk/ContentShellTestBase.java
diff --git a/content/shell/android/javatests/src/org/chromium/content_shell_apk/ContentShellTestBase.java b/content/shell/android/javatests/src/org/chromium/content_shell_apk/ContentShellTestBase.java
index 9abfda3c77e683d21e281410906d7aec8c261992..0ce8a7f67e3a064f36a05483877317e2e3fa0000 100644
--- a/content/shell/android/javatests/src/org/chromium/content_shell_apk/ContentShellTestBase.java
+++ b/content/shell/android/javatests/src/org/chromium/content_shell_apk/ContentShellTestBase.java
@@ -185,4 +185,20 @@ public class ContentShellTestBase extends ActivityInstrumentationTestCase2<Conte
callbackHelper.waitForCallback(
currentCallCount, 1, WAIT_PAGE_LOADING_TIMEOUT_SECONDS, TimeUnit.SECONDS);
}
+
+ // TODO(aelias): This method needs to be removed once http://crbug.com/179511 is fixed.
+ // Meanwhile, we have to wait if the page has the <meta viewport> tag.
+ /**
+ * Waits till the ContentViewCore receives the expected page scale factor
+ * from the compositor and asserts that this happens.
+ */
+ protected void assertWaitForPageScaleFactorMatch(final float expectedScale)
+ throws InterruptedException {
+ assertTrue(CriteriaHelper.pollForCriteria(new Criteria() {
+ @Override
+ public boolean isSatisfied() {
+ return getContentViewCore().getScale() == expectedScale;
+ }
+ }));
+ }
}
« no previous file with comments | « content/public/android/javatests/src/org/chromium/content/browser/input/SelectionHandleTest.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698