| Index: components/dom_distiller/content/browser/distiller_page_web_contents_browsertest.cc
|
| diff --git a/components/dom_distiller/content/browser/distiller_page_web_contents_browsertest.cc b/components/dom_distiller/content/browser/distiller_page_web_contents_browsertest.cc
|
| index f79702cd409a77a884776ac4756ee3639ff13a83..2805c3e761acb4aa4b564ca25358cd8f92d685f5 100644
|
| --- a/components/dom_distiller/content/browser/distiller_page_web_contents_browsertest.cc
|
| +++ b/components/dom_distiller/content/browser/distiller_page_web_contents_browsertest.cc
|
| @@ -23,6 +23,7 @@
|
| #include "components/dom_distiller/core/viewer.h"
|
| #include "content/public/browser/browser_context.h"
|
| #include "content/public/browser/navigation_controller.h"
|
| +#include "content/public/browser/navigation_handle.h"
|
| #include "content/public/browser/render_frame_host.h"
|
| #include "content/public/browser/web_contents_observer.h"
|
| #include "content/public/common/isolated_world_ids.h"
|
| @@ -55,13 +56,11 @@ class WebContentsMainFrameHelper : public content::WebContentsObserver {
|
| callback_(callback),
|
| wait_for_document_loaded_(wait_for_document_loaded) {}
|
|
|
| - void DidCommitProvisionalLoadForFrame(
|
| - content::RenderFrameHost* render_frame_host,
|
| - const GURL& url,
|
| - ui::PageTransition transition_type) override {
|
| + void DidFinishNavigation(
|
| + content::NavigationHandle* navigation_handle) override {
|
| if (wait_for_document_loaded_)
|
| return;
|
| - if (!render_frame_host->GetParent())
|
| + if (navigation_handle->HasCommitted() && navigation_handle->IsInMainFrame())
|
| callback_.Run();
|
| }
|
|
|
|
|