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

Unified Diff: third_party/WebKit/Source/web/WebFrameContentDumper.cpp

Issue 1831423003: Audit test code callsites that need an explicit lifecycle update. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clean up. Created 4 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
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | third_party/WebKit/Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/WebFrameContentDumper.cpp
diff --git a/third_party/WebKit/Source/web/WebFrameContentDumper.cpp b/third_party/WebKit/Source/web/WebFrameContentDumper.cpp
index c28d1fc6b208da451b2aa6c1d5fdfee9094e1314..937004f28a5f1c874d8c21a94524e99e108a3069 100644
--- a/third_party/WebKit/Source/web/WebFrameContentDumper.cpp
+++ b/third_party/WebKit/Source/web/WebFrameContentDumper.cpp
@@ -13,6 +13,7 @@
#include "core/layout/LayoutView.h"
#include "public/web/WebDocument.h"
#include "public/web/WebLocalFrame.h"
+#include "public/web/WebView.h"
#include "web/WebLocalFrameImpl.h"
#include "wtf/text/WTFString.h"
@@ -76,7 +77,7 @@ static void frameContentAsPlainText(size_t maxChars, LocalFrame* frame, StringBu
}
}
-WebString WebFrameContentDumper::dumpFrameTreeAsText(WebLocalFrame* frame, size_t maxChars)
+WebString WebFrameContentDumper::deprecatedDumpFrameTreeAsText(WebLocalFrame* frame, size_t maxChars)
{
if (!frame)
return WebString();
@@ -85,6 +86,13 @@ WebString WebFrameContentDumper::dumpFrameTreeAsText(WebLocalFrame* frame, size_
return text.toString();
}
+WebString WebFrameContentDumper::dumpWebViewAsText(WebView* webView, size_t maxChars)
+{
+ ASSERT(webView);
+ webView->updateAllLifecyclePhases();
+ return WebFrameContentDumper::deprecatedDumpFrameTreeAsText(webView->mainFrame()->toWebLocalFrame(), maxChars);
+}
+
WebString WebFrameContentDumper::dumpAsMarkup(WebLocalFrame* frame)
{
if (!frame)
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | third_party/WebKit/Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698