#include "chrome/browser/device_api/managed_configuration_service.h"
#include <memory>
#include <string_view>
#include <tuple>
#include "base/check_deref.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "chrome/test/base/testing_browser_process.h"
#include "chrome/test/base/testing_profile.h"
#include "chrome/test/base/testing_profile_manager.h"
#include "content/public/test/navigation_simulator.h"
#include "content/public/test/web_contents_tester.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "url/gurl.h"
namespace {
constexpr std::string_view kUrl = …;
std::tuple<ManagedConfigurationServiceImpl*,
mojo::Remote<blink::mojom::ManagedConfigurationService>>
MaybeCreateService(content::WebContents* web_contents) { … }
std::tuple<ManagedConfigurationServiceImpl&,
mojo::Remote<blink::mojom::ManagedConfigurationService>>
CreateService(content::WebContents* web_contents) { … }
class ChangeObserver : public blink::mojom::ManagedConfigurationObserver { … };
}
ManagedConfigurationServiceTest;
TEST_F(ManagedConfigurationServiceTest,
ChangeNotificationWithoutObserversDoesNotCrash) { … }
TEST_F(ManagedConfigurationServiceTest, NotifiesChangesToObserver) { … }
TEST_F(ManagedConfigurationServiceTest, SupportsOneObserverAtATime) { … }
TEST_F(ManagedConfigurationServiceTest, IsBoundInNormalProfile) { … }
TEST_F(ManagedConfigurationServiceTest, IsNotBoundInIncognito) { … }
class ManagedConfigurationServiceGuestTest
: public ChromeRenderViewHostTestHarness { … };
TEST_F(ManagedConfigurationServiceGuestTest, IsNotBoundInGuestProfile) { … }