Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <cstring> | 5 #include <cstring> |
| 6 #include <memory> | 6 #include <memory> |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 1328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1339 | 1339 |
| 1340 EnableTransferSAMLCookiesPolicy(); | 1340 EnableTransferSAMLCookiesPolicy(); |
| 1341 LogInWithSAML(kFirstSAMLUserEmail, kTestAuthSIDCookie2, kTestAuthLSIDCookie2); | 1341 LogInWithSAML(kFirstSAMLUserEmail, kTestAuthSIDCookie2, kTestAuthLSIDCookie2); |
| 1342 | 1342 |
| 1343 GetCookies(); | 1343 GetCookies(); |
| 1344 EXPECT_EQ(kTestAuthSIDCookie1, GetCookieValue(kGAIASIDCookieName)); | 1344 EXPECT_EQ(kTestAuthSIDCookie1, GetCookieValue(kGAIASIDCookieName)); |
| 1345 EXPECT_EQ(kTestAuthLSIDCookie1, GetCookieValue(kGAIALSIDCookieName)); | 1345 EXPECT_EQ(kTestAuthLSIDCookie1, GetCookieValue(kGAIALSIDCookieName)); |
| 1346 EXPECT_EQ(kSAMLIdPCookieValue2, GetCookieValue(kSAMLIdPCookieName)); | 1346 EXPECT_EQ(kSAMLIdPCookieValue2, GetCookieValue(kSAMLIdPCookieName)); |
| 1347 } | 1347 } |
| 1348 | 1348 |
| 1349 // Flaky on Debug, ASan and MSan bots: crbug.com/683161. | 1349 // PRE_TransferCookiesUnaffiliated and TransferCookiesUnaffiliated are flaky on |
| 1350 IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, | 1350 // MSAN and ASAN, most probably timing out. See crbug.com/683161. |
| 1351 DISABLED_PRE_TransferCookiesUnaffiliated) { | 1351 #if defined(MEMORY_SANITIZER) || defined(ADDRESS_SANITIZER) |
| 1352 #define MAYBE_PRE_TransferCookiesUnaffiliated \ | |
| 1353 DISABLED_PRE_TransferCookiesUnaffiliated | |
| 1354 #define MAYBE_TransferCookiesUnaffiliated DISABLED_TransferCookiesUnaffiliated | |
| 1355 #else | |
| 1356 #define MAYBE_PRE_TransferCookiesUnaffiliated PRE_TransferCookiesUnaffiliated | |
| 1357 #define MAYBE_TransferCookiesUnaffiliated TransferCookiesUnaffiliated | |
| 1358 #endif | |
|
achuithb
2017/04/11 18:52:14
maybe a newline after this line?
emaxx
2017/04/11 23:16:40
Done.
| |
| 1359 IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, MAYBE_PRE_TransferCookiesUnaffiliated) { | |
| 1352 fake_saml_idp()->SetCookieValue(kSAMLIdPCookieValue1); | 1360 fake_saml_idp()->SetCookieValue(kSAMLIdPCookieValue1); |
| 1353 LogInWithSAML(kDifferentDomainSAMLUserEmail, | 1361 LogInWithSAML(kDifferentDomainSAMLUserEmail, |
| 1354 kTestAuthSIDCookie1, | 1362 kTestAuthSIDCookie1, |
| 1355 kTestAuthLSIDCookie1); | 1363 kTestAuthLSIDCookie1); |
| 1356 | 1364 |
| 1357 GetCookies(); | 1365 GetCookies(); |
| 1358 EXPECT_EQ(kTestAuthSIDCookie1, GetCookieValue(kGAIASIDCookieName)); | 1366 EXPECT_EQ(kTestAuthSIDCookie1, GetCookieValue(kGAIASIDCookieName)); |
| 1359 EXPECT_EQ(kTestAuthLSIDCookie1, GetCookieValue(kGAIALSIDCookieName)); | 1367 EXPECT_EQ(kTestAuthLSIDCookie1, GetCookieValue(kGAIALSIDCookieName)); |
| 1360 EXPECT_EQ(kSAMLIdPCookieValue1, GetCookieValue(kSAMLIdPCookieName)); | 1368 EXPECT_EQ(kSAMLIdPCookieValue1, GetCookieValue(kSAMLIdPCookieName)); |
| 1361 } | 1369 } |
| 1362 | 1370 |
| 1363 // Verifies that even if the DeviceTransferSAMLCookies policy is enabled, SAML | 1371 // Verifies that even if the DeviceTransferSAMLCookies policy is enabled, SAML |
| 1364 // IdP are not transferred to a user's profile on subsequent login if the user | 1372 // IdP are not transferred to a user's profile on subsequent login if the user |
| 1365 // does not belong to the domain that the device is enrolled into. Also verifies | 1373 // does not belong to the domain that the device is enrolled into. Also verifies |
| 1366 // that GAIA cookies are not transferred. | 1374 // that GAIA cookies are not transferred. |
| 1367 // Flaky on Debug, ASan and MSan bots: crbug.com/683161. | 1375 IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, MAYBE_TransferCookiesUnaffiliated) { |
| 1368 IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, DISABLED_TransferCookiesUnaffiliated) { | |
| 1369 fake_saml_idp()->SetCookieValue(kSAMLIdPCookieValue2); | 1376 fake_saml_idp()->SetCookieValue(kSAMLIdPCookieValue2); |
| 1370 fake_saml_idp()->SetLoginHTMLTemplate("saml_login.html"); | 1377 fake_saml_idp()->SetLoginHTMLTemplate("saml_login.html"); |
| 1371 ShowGAIALoginForm(); | 1378 ShowGAIALoginForm(); |
| 1372 | 1379 |
| 1373 EnableTransferSAMLCookiesPolicy(); | 1380 EnableTransferSAMLCookiesPolicy(); |
| 1374 LogInWithSAML(kDifferentDomainSAMLUserEmail, | 1381 LogInWithSAML(kDifferentDomainSAMLUserEmail, |
| 1375 kTestAuthSIDCookie1, | 1382 kTestAuthSIDCookie1, |
| 1376 kTestAuthLSIDCookie1); | 1383 kTestAuthLSIDCookie1); |
| 1377 | 1384 |
| 1378 GetCookies(); | 1385 GetCookies(); |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1469 ->SetContentSettingDefaultScope(url3, url3, | 1476 ->SetContentSettingDefaultScope(url3, url3, |
| 1470 CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA, | 1477 CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA, |
| 1471 std::string(), CONTENT_SETTING_ALLOW); | 1478 std::string(), CONTENT_SETTING_ALLOW); |
| 1472 | 1479 |
| 1473 EXPECT_FALSE( | 1480 EXPECT_FALSE( |
| 1474 MediaCaptureDevicesDispatcher::GetInstance()->CheckMediaAccessPermission( | 1481 MediaCaptureDevicesDispatcher::GetInstance()->CheckMediaAccessPermission( |
| 1475 web_contents, url3, content::MEDIA_DEVICE_VIDEO_CAPTURE)); | 1482 web_contents, url3, content::MEDIA_DEVICE_VIDEO_CAPTURE)); |
| 1476 } | 1483 } |
| 1477 | 1484 |
| 1478 } // namespace chromeos | 1485 } // namespace chromeos |
| OLD | NEW |