#include "chrome/browser/ui/views/translate/translate_bubble_controller.h"
#include <memory>
#include "base/memory/raw_ptr.h"
#include "base/observer_list.h"
#include "base/test/bind.h"
#include "base/test/scoped_feature_list.h"
#include "chrome/browser/ui/translate/partial_translate_bubble_model.h"
#include "chrome/test/base/testing_profile.h"
#include "chrome/test/views/chrome_views_test_base.h"
#include "components/translate/core/browser/mock_translate_metrics_logger.h"
#include "components/translate/core/browser/translate_step.h"
#include "components/translate/core/common/translate_constants.h"
#include "components/translate/core/common/translate_errors.h"
#include "components/translate/core/common/translate_util.h"
#include "content/public/test/test_renderer_host.h"
#include "content/public/test/web_contents_tester.h"
namespace {
class FakeTranslateBubbleModel : public TranslateBubbleModel { … };
class FakePartialTranslateBubbleModel : public PartialTranslateBubbleModel { … };
}
class TranslateBubbleControllerTest : public ChromeViewsTestBase { … };
TEST_F(TranslateBubbleControllerTest, ShowFullPageThenPartialTranslateBubble) { … }
TEST_F(TranslateBubbleControllerTest, ShowPartialThenFullPageTranslateBubble) { … }
TEST_F(TranslateBubbleControllerTest, PartialTranslateTimerExpired) { … }
TEST_F(TranslateBubbleControllerTest, PartialTranslateResponseBeforeTimer) { … }
TEST_F(TranslateBubbleControllerTest, PartialTranslateError) { … }
TEST_F(TranslateBubbleControllerTest, PartialTranslateSourceTextTruncatedTrue) { … }
TEST_F(TranslateBubbleControllerTest,
PartialTranslateSourceTextTruncatedFalse) { … }