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

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

Issue 2687573002: [Android Webview] Refactor LoadUrlTest and work on embedded_test_server custom handler (Closed)
Patch Set: Change AwETS intent class name Created 3 years, 6 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 4e3165e05e532d7cf850f1e1fbfe08de952681b2..92ade8578f51aad1e9f9b79497aec56f1f3602bc 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
@@ -571,6 +571,17 @@ public class AwTestBase
code);
}
+ /**
+ * 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