Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1397)

Unified Diff: chrome/browser/chromeos/system/device_disabling_browsertest.cc

Issue 1095843003: [cros] Modify oobe/login tests to work with webview (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/system/device_disabling_browsertest.cc
diff --git a/chrome/browser/chromeos/system/device_disabling_browsertest.cc b/chrome/browser/chromeos/system/device_disabling_browsertest.cc
index 1470800f3fe33fc9c9a136b9e758bbbb66a4550c..62e4cb8db7fac5e40fdf9a1a9f90a7f61c8e108b 100644
--- a/chrome/browser/chromeos/system/device_disabling_browsertest.cc
+++ b/chrome/browser/chromeos/system/device_disabling_browsertest.cc
@@ -48,9 +48,12 @@ void ErrorCallbackFunction(const std::string& error_name,
} // namespace
+// Boolean parameter is used to run this test for webview (true) and for
+// iframe (false) GAIA sign in.
class DeviceDisablingTest
: public OobeBaseTest,
- public NetworkStateInformer::NetworkStateInformerObserver {
+ public NetworkStateInformer::NetworkStateInformerObserver,
+ public testing::WithParamInterface<bool> {
public:
DeviceDisablingTest();
@@ -80,6 +83,7 @@ class DeviceDisablingTest
DeviceDisablingTest::DeviceDisablingTest()
: fake_session_manager_client_(new FakeSessionManagerClient) {
+ set_use_webview(GetParam());
}
void DeviceDisablingTest::MarkDisabledAndWaitForPolicyFetch() {
@@ -135,8 +139,7 @@ void DeviceDisablingTest::UpdateState(NetworkError::ErrorReason reason) {
network_state_change_wait_run_loop_.Quit();
}
-
-IN_PROC_BROWSER_TEST_F(DeviceDisablingTest, DisableDuringNormalOperation) {
+IN_PROC_BROWSER_TEST_P(DeviceDisablingTest, DisableDuringNormalOperation) {
// Mark the device as disabled and wait until cros settings update.
MarkDisabledAndWaitForPolicyFetch();
@@ -155,7 +158,7 @@ IN_PROC_BROWSER_TEST_F(DeviceDisablingTest, DisableDuringNormalOperation) {
// causes the UI to try and show the login screen after some delay. It must
// be ensured that the login screen does not show and does not clobber the
// disabled screen.
-IN_PROC_BROWSER_TEST_F(DeviceDisablingTest, DisableWithEphemeralUsers) {
+IN_PROC_BROWSER_TEST_P(DeviceDisablingTest, DisableWithEphemeralUsers) {
// Connect to the fake Ethernet network. This ensures that Chrome OS will not
// try to show the offline error screen.
base::RunLoop connect_run_loop;
@@ -219,5 +222,9 @@ IN_PROC_BROWSER_TEST_F(DeviceDisablingTest, DisableWithEphemeralUsers) {
EXPECT_EQ(OobeUI::kScreenDeviceDisabled, GetCurrentScreenName(web_contents));
}
+INSTANTIATE_TEST_CASE_P(DeviceDisablingSuite,
+ DeviceDisablingTest,
+ testing::Bool());
+
} // namespace system
} // namespace chromeos
« no previous file with comments | « chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698