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

Unified Diff: android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java

Issue 2670643002: [Android] Refactor LoadUrlTest to replace package org.apache.http (Closed)
Patch Set: remove standardSetup Created 3 years, 10 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: android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java b/android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java
index dd079f1baaf1f5969852bd23d70cc5c821062187..dd31402e2d14467041af7321dd8115a2e292032d 100644
--- a/android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java
+++ b/android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java
@@ -536,6 +536,17 @@ public class AwTestBase
}
/**
+ * Executes JavaScript code within the given ContentView to get the text content in
+ * document body. Returns the result string without double quotes.
+ */
+ protected String getJavaScriptResultBodyTextContent(final AwContents awContents,
+ final TestAwContentsClient viewClient) throws Exception {
+ String raw = executeJavaScriptAndWaitForResult(awContents,
+ viewClient, "document.body.textContent");
+ return maybeStripDoubleQuotes(raw);
+ }
+
+ /**
* Wrapper around CriteriaHelper.pollInstrumentationThread. This uses AwTestBase-specifc
* timeouts and treats timeouts and exceptions as test failures automatically.
*/

Powered by Google App Engine
This is Rietveld 408576698