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

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: sgurun comment Created 3 years, 9 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 ffd609e9add8624e4c7aef44eae17900f934e9ff..09c0ca8ba4b9128bec55b87202fd3e135efdd957 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
}
/**
+ * 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