chromium/chrome/browser/dom_distiller/test_distillation_observers.h

// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_DOM_DISTILLER_TEST_DISTILLATION_OBSERVERS_H_
#define CHROME_BROWSER_DOM_DISTILLER_TEST_DISTILLATION_OBSERVERS_H_

#include "base/run_loop.h"
#include "content/public/browser/web_contents_observer.h"

namespace dom_distiller {

// Helper class that blocks test execution until |observed_contents| enters a
// certain state. Subclasses specify the precise state by calling
// |Stop()| when |observed_contents| is ready.
class NavigationObserver : public content::WebContentsObserver {};

class OriginalPageNavigationObserver : public NavigationObserver {};

// DistilledPageObserver is used to detect if a distilled page has
// finished loading. This is done by checking how many times the title has
// been set rather than using "DidFinishLoad" directly due to the content
// being set by JavaScript.
class DistilledPageObserver : public NavigationObserver {};

}  // namespace dom_distiller

#endif  // CHROME_BROWSER_DOM_DISTILLER_TEST_DISTILLATION_OBSERVERS_H_