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

Unified Diff: headless/app/headless_shell.cc

Issue 2677033003: headless: Add a small C++ example application (Closed)
Patch Set: Rebased 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
« no previous file with comments | « headless/app/headless_shell.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: headless/app/headless_shell.cc
diff --git a/headless/app/headless_shell.cc b/headless/app/headless_shell.cc
index 06940881c3f58f14d53e8fa4f5461c57b2398c8a..04300eec603be7f07906207771a416895ff76ce7 100644
--- a/headless/app/headless_shell.cc
+++ b/headless/app/headless_shell.cc
@@ -261,14 +261,14 @@ void HeadlessShell::OnPageReady() {
void HeadlessShell::FetchDom() {
devtools_client_->GetRuntime()->Evaluate(
- "document.body.innerHTML",
+ "document.body.outerHTML",
base::Bind(&HeadlessShell::OnDomFetched, weak_factory_.GetWeakPtr()));
}
void HeadlessShell::OnDomFetched(
std::unique_ptr<runtime::EvaluateResult> result) {
if (result->HasExceptionDetails()) {
- LOG(ERROR) << "Failed to evaluate document.body.innerHTML: "
+ LOG(ERROR) << "Failed to evaluate document.body.outerHTML: "
<< result->GetExceptionDetails()->GetText();
} else {
std::string dom;
« no previous file with comments | « headless/app/headless_shell.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698