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

Unified Diff: content/shell/renderer/test_runner/web_test_proxy.cc

Issue 1131993009: Remove the usage of WebElement::innerText in Chromium. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed serializer test. Created 5 years, 7 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/renderer/dom_serializer_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/renderer/test_runner/web_test_proxy.cc
diff --git a/content/shell/renderer/test_runner/web_test_proxy.cc b/content/shell/renderer/test_runner/web_test_proxy.cc
index 8b3cfdee2b344823b4a4049fb54e4a0d32678120..6b97d39df6e4cd2a9a9cc3449388815db1fd0483 100644
--- a/content/shell/renderer/test_runner/web_test_proxy.cc
+++ b/content/shell/renderer/test_runner/web_test_proxy.cc
@@ -311,12 +311,7 @@ std::string DumpFramesAsMarkup(blink::WebFrame* frame, bool recursive) {
}
std::string DumpDocumentText(blink::WebFrame* frame) {
- // We use the document element's text instead of the body text here because
- // not all documents have a body, such as XML documents.
- blink::WebElement document_element = frame->document().documentElement();
- if (document_element.isNull())
- return std::string();
- return document_element.innerText().utf8();
+ return frame->document().contentAsTextForTesting().utf8();
}
std::string DumpFramesAsText(blink::WebFrame* frame, bool recursive) {
« no previous file with comments | « content/renderer/dom_serializer_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698