#include "components/translate/content/renderer/translate_agent.h"
#include <tuple>
#include "base/base_paths.h"
#include "base/files/file.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/functional/bind.h"
#include "base/memory/raw_ptr.h"
#include "base/path_service.h"
#include "base/run_loop.h"
#include "base/test/scoped_feature_list.h"
#include "base/time/time.h"
#include "base/types/cxx23_to_underlying.h"
#include "chrome/common/chrome_isolated_world_ids.h"
#include "chrome/test/base/chrome_render_view_test.h"
#include "components/translate/content/common/translate.mojom.h"
#include "components/translate/core/common/translate_constants.h"
#include "components/translate/core/common/translate_util.h"
#include "content/public/common/url_constants.h"
#include "content/public/renderer/render_frame.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/receiver_set.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/platform/browser_interface_broker_proxy.h"
#include "third_party/blink/public/web/web_local_frame.h"
_;
AtLeast;
Return;
namespace {
std::string UpdateGURLScheme(GURL url, const char scheme[]) { … }
class FakeContentTranslateDriver
: public translate::mojom::ContentTranslateDriver { … };
base::File LoadModelFile(const base::FilePath& model_file_path) { … }
base::FilePath model_file_path() { … }
}
class TestTranslateAgent : public translate::TranslateAgent { … };
class TranslateAgentBrowserTest : public ChromeRenderViewTest { … };
TEST_F(TranslateAgentBrowserTest, TranslateLibNeverReady) { … }
TEST_F(TranslateAgentBrowserTest, TranslateSuccess) { … }
TEST_F(TranslateAgentBrowserTest, TranslateFailure) { … }
TEST_F(TranslateAgentBrowserTest, UndefinedSourceLang) { … }
TEST_F(TranslateAgentBrowserTest, MultipleSimilarTranslations) { … }
TEST_F(TranslateAgentBrowserTest, MultipleDifferentTranslations) { … }
TEST_F(TranslateAgentBrowserTest, TranslatablePage) { … }
TEST_F(TranslateAgentBrowserTest, LanguageMetaTag) { … }
TEST_F(TranslateAgentBrowserTest, LanguageMetaTagCase) { … }
TEST_F(TranslateAgentBrowserTest, LanguageCommonMistakesAreCorrected) { … }
TEST_F(TranslateAgentBrowserTest, BackToTranslatablePage) { … }
TEST_F(TranslateAgentBrowserTest, UnsupportedTranslateSchemes) { … }