#include <memory>
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/browser/profiles/profile.h"
#include "content/public/test/browser_test.h"
#include "extensions/browser/api/idle/idle_manager_factory.h"
#include "extensions/browser/api/idle/test_idle_provider.h"
namespace extensions {
ContextType;
class IdleApiTest : public ExtensionApiTest,
public testing::WithParamInterface<ContextType> { … };
INSTANTIATE_TEST_SUITE_P(…);
INSTANTIATE_TEST_SUITE_P(…);
IN_PROC_BROWSER_TEST_P(IdleApiTest, QueryStateActive) { … }
IN_PROC_BROWSER_TEST_P(IdleApiTest, QueryStateIdle) { … }
IN_PROC_BROWSER_TEST_P(IdleApiTest, QueryStateAlmostIdle) { … }
IN_PROC_BROWSER_TEST_P(IdleApiTest, QueryStateLocked) { … }
IN_PROC_BROWSER_TEST_P(IdleApiTest, SetDetectionInterval) { … }
#if BUILDFLAG(IS_CHROMEOS)
IN_PROC_BROWSER_TEST_P(IdleApiTest, IdleGetAutoLockDelay) {
ASSERT_TRUE(RunExtensionTest("idle/get_auto_lock_delay")) << message_;
}
#else
IN_PROC_BROWSER_TEST_P(IdleApiTest, UnsupportedIdleGetAutoLockDelay) { … }
#endif
}