#include "chrome/browser/extensions/webstore_reinstaller.h"
#include "base/functional/bind.h"
#include "base/memory/scoped_refptr.h"
#include "base/run_loop.h"
#include "base/test/scoped_feature_list.h"
#include "base/values.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/webstore_data_fetcher.h"
#include "chrome/browser/extensions/webstore_installer_test.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/extensions/webstore_install_result.h"
#include "content/public/test/browser_test.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_builder.h"
#include "extensions/common/extension_features.h"
namespace extensions {
namespace {
constexpr char kWebstoreDomain[] = …;
constexpr char kAppDomain[] = …;
constexpr char kNonAppDomain[] = …;
constexpr char kTestExtensionId[] = …;
constexpr char kTestDataPath[] = …;
constexpr char kCrxFilename[] = …;
constexpr char kMockTitle[] = …;
constexpr char kMockUserCountString[] = …;
constexpr double kMockAverageRating = …;
constexpr int kMockRatingCount = …;
constexpr char kMockRatingCountString[] = …;
constexpr char kMockLogoUri[] = …;
constexpr char kMockManifest[] = …;
std::unique_ptr<FetchItemSnippetResponse> CreateMockResponse(
const ExtensionId& id) { … }
}
class WebstoreReinstallerBrowserTest : public WebstoreInstallerTest { … };
void WebstoreReinstallerBrowserTest::OnInstallCompletion(
base::OnceClosure quit_closure,
bool success,
const std::string& error,
webstore_install::Result result) { … }
IN_PROC_BROWSER_TEST_F(WebstoreReinstallerBrowserTest, TestWebstoreReinstall) { … }
class WebstoreReinstallerItemSnippetsBrowserTest
: public WebstoreReinstallerBrowserTest { … };
IN_PROC_BROWSER_TEST_F(WebstoreReinstallerItemSnippetsBrowserTest,
TestWebstoreReinstall) { … }
}