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

Unified Diff: components/dom_distiller/content/distiller_page_web_contents_browsertest.cc

Issue 1036563002: Simplify callback style in DomDistiller tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/dom_distiller/content/distiller_page_web_contents_browsertest.cc
diff --git a/components/dom_distiller/content/distiller_page_web_contents_browsertest.cc b/components/dom_distiller/content/distiller_page_web_contents_browsertest.cc
index 4228add711e33115c5239cbdb58f36b1ce4b342f..a743a3c9f2942dfb1e432750540c2b4e1ec0cfbd 100644
--- a/components/dom_distiller/content/distiller_page_web_contents_browsertest.cc
+++ b/components/dom_distiller/content/distiller_page_web_contents_browsertest.cc
@@ -91,19 +91,19 @@ class DistillerPageWebContentsTest : public ContentBrowserTest {
}
void DistillPage(const base::Closure& quit_closure, const std::string& url) {
- quit_closure_ = quit_closure;
distiller_page_->DistillPage(
embedded_test_server()->GetURL(url),
dom_distiller::proto::DomDistillerOptions(),
base::Bind(&DistillerPageWebContentsTest::OnPageDistillationFinished,
- this));
+ this, quit_closure));
}
void OnPageDistillationFinished(
+ base::Closure quit_closure,
scoped_ptr<proto::DomDistillerResult> distiller_result,
bool distillation_successful) {
distiller_result_ = distiller_result.Pass();
- quit_closure_.Run();
+ quit_closure.Run();
}
void OnJsExecutionDone(base::Closure callback, const base::Value* value) {
@@ -144,7 +144,6 @@ class DistillerPageWebContentsTest : public ContentBrowserTest {
bool wait_for_document_loaded);
DistillerPageWebContents* distiller_page_;
- base::Closure quit_closure_;
scoped_ptr<proto::DomDistillerResult> distiller_result_;
scoped_ptr<base::Value> js_result_;
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698