Commit 3d636120 authored by wychen's avatar wychen Committed by Commit bot

Simplify callback style in DomDistiller tests

Review URL: https://codereview.chromium.org/1036563002

Cr-Commit-Position: refs/heads/master@{#338365}
parent c2b13973
......@@ -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_;
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment