This source file includes following definitions.
- IN_PROC_BROWSER_TEST_F
- IN_PROC_BROWSER_TEST_F
#include "chrome/browser/chromeos/drive/drive_integration_service.h"
#include "base/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/common/pref_names.h"
#include "chrome/test/base/in_process_browser_test.h"
namespace drive {
class DriveIntegrationServiceBrowserTest : public InProcessBrowserTest {
};
IN_PROC_BROWSER_TEST_F(DriveIntegrationServiceBrowserTest,
CreatedDuringLogin) {
EXPECT_TRUE(DriveIntegrationServiceFactory::FindForProfile(
browser()->profile()));
}
IN_PROC_BROWSER_TEST_F(DriveIntegrationServiceBrowserTest,
DisableDrivePolicyTest) {
browser()->profile()->GetPrefs()->SetBoolean(prefs::kDisableDrive, false);
drive::DriveIntegrationService* integration_service =
drive::DriveIntegrationServiceFactory::FindForProfile(
browser()->profile());
EXPECT_TRUE(integration_service);
EXPECT_TRUE(integration_service->is_enabled());
browser()->profile()->GetPrefs()->SetBoolean(prefs::kDisableDrive, true);
EXPECT_EQ(integration_service,
drive::DriveIntegrationServiceFactory::FindForProfile(
browser()->profile()));
EXPECT_FALSE(integration_service->is_enabled());
}
}