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

Unified Diff: chrome/android/testshell/javatests/src/org/chromium/chrome/testshell/ChromiumTestShellTestBase.java

Issue 11778005: JavascriptAppModalDialog tests and necessary infrastructure. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Upstreamed pliard@'s click-after-dismiss regression test. Created 7 years, 11 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
Index: chrome/android/testshell/javatests/src/org/chromium/chrome/testshell/ChromiumTestShellTestBase.java
diff --git a/chrome/android/testshell/javatests/src/org/chromium/chrome/testshell/ChromiumTestShellTestBase.java b/chrome/android/testshell/javatests/src/org/chromium/chrome/testshell/ChromiumTestShellTestBase.java
index aabfc48151dcd5bc450b903427452a33a2b44701..1c80486c65f20684b46ed90e7538aba55c706b93 100644
--- a/chrome/android/testshell/javatests/src/org/chromium/chrome/testshell/ChromiumTestShellTestBase.java
+++ b/chrome/android/testshell/javatests/src/org/chromium/chrome/testshell/ChromiumTestShellTestBase.java
@@ -57,7 +57,7 @@ public class ChromiumTestShellTestBase extends
* @return Whether or not the Shell was actually finished loading.
* @throws Exception
*/
- protected boolean waitForActiveShellToBeDoneLoading() throws Exception {
+ protected boolean waitForActiveShellToBeDoneLoading() throws InterruptedException {
final ChromiumTestShellActivity activity = getActivity();
// Wait for the Content Shell to be initialized.
@@ -86,4 +86,18 @@ public class ChromiumTestShellTestBase extends
}
}, WAIT_FOR_ACTIVE_SHELL_LOADING_TIMEOUT, CriteriaHelper.DEFAULT_POLLING_INTERVAL);
}
+
+ /**
+ * Navigates the currently active tab to a sanitized version of {@code url}.
+ * @param url The potentially unsanitized URL to navigate to.
+ */
+ public void loadUrlWithSanitization(final String url) throws InterruptedException {
+ getInstrumentation().runOnMainSync(new Runnable() {
+ @Override
+ public void run() {
+ getActivity().getActiveTab().loadUrlWithSanitization(url);
+ }
+ });
+ waitForActiveShellToBeDoneLoading();
+ }
}

Powered by Google App Engine
This is Rietveld 408576698