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

Side by Side Diff: chrome/browser/chromeos/login/saml/saml_browsertest.cc

Issue 2812013002: Re-enable TransferCookiesUnaffiliated test everywhere except MSAN,ASAN (Closed)
Patch Set: Fix nit Created 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
1359
1360 IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, MAYBE_PRE_TransferCookiesUnaffiliated) {
1352 fake_saml_idp()->SetCookieValue(kSAMLIdPCookieValue1); 1361 fake_saml_idp()->SetCookieValue(kSAMLIdPCookieValue1);
1353 LogInWithSAML(kDifferentDomainSAMLUserEmail, 1362 LogInWithSAML(kDifferentDomainSAMLUserEmail,
1354 kTestAuthSIDCookie1, 1363 kTestAuthSIDCookie1,
1355 kTestAuthLSIDCookie1); 1364 kTestAuthLSIDCookie1);
1356 1365
1357 GetCookies(); 1366 GetCookies();
1358 EXPECT_EQ(kTestAuthSIDCookie1, GetCookieValue(kGAIASIDCookieName)); 1367 EXPECT_EQ(kTestAuthSIDCookie1, GetCookieValue(kGAIASIDCookieName));
1359 EXPECT_EQ(kTestAuthLSIDCookie1, GetCookieValue(kGAIALSIDCookieName)); 1368 EXPECT_EQ(kTestAuthLSIDCookie1, GetCookieValue(kGAIALSIDCookieName));
1360 EXPECT_EQ(kSAMLIdPCookieValue1, GetCookieValue(kSAMLIdPCookieName)); 1369 EXPECT_EQ(kSAMLIdPCookieValue1, GetCookieValue(kSAMLIdPCookieName));
1361 } 1370 }
1362 1371
1363 // Verifies that even if the DeviceTransferSAMLCookies policy is enabled, SAML 1372 // 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 1373 // 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 1374 // does not belong to the domain that the device is enrolled into. Also verifies
1366 // that GAIA cookies are not transferred. 1375 // that GAIA cookies are not transferred.
1367 // Flaky on Debug, ASan and MSan bots: crbug.com/683161. 1376 IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, MAYBE_TransferCookiesUnaffiliated) {
1368 IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, DISABLED_TransferCookiesUnaffiliated) {
1369 fake_saml_idp()->SetCookieValue(kSAMLIdPCookieValue2); 1377 fake_saml_idp()->SetCookieValue(kSAMLIdPCookieValue2);
1370 fake_saml_idp()->SetLoginHTMLTemplate("saml_login.html"); 1378 fake_saml_idp()->SetLoginHTMLTemplate("saml_login.html");
1371 ShowGAIALoginForm(); 1379 ShowGAIALoginForm();
1372 1380
1373 EnableTransferSAMLCookiesPolicy(); 1381 EnableTransferSAMLCookiesPolicy();
1374 LogInWithSAML(kDifferentDomainSAMLUserEmail, 1382 LogInWithSAML(kDifferentDomainSAMLUserEmail,
1375 kTestAuthSIDCookie1, 1383 kTestAuthSIDCookie1,
1376 kTestAuthLSIDCookie1); 1384 kTestAuthLSIDCookie1);
1377 1385
1378 GetCookies(); 1386 GetCookies();
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
1469 ->SetContentSettingDefaultScope(url3, url3, 1477 ->SetContentSettingDefaultScope(url3, url3,
1470 CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA, 1478 CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA,
1471 std::string(), CONTENT_SETTING_ALLOW); 1479 std::string(), CONTENT_SETTING_ALLOW);
1472 1480
1473 EXPECT_FALSE( 1481 EXPECT_FALSE(
1474 MediaCaptureDevicesDispatcher::GetInstance()->CheckMediaAccessPermission( 1482 MediaCaptureDevicesDispatcher::GetInstance()->CheckMediaAccessPermission(
1475 web_contents, url3, content::MEDIA_DEVICE_VIDEO_CAPTURE)); 1483 web_contents, url3, content::MEDIA_DEVICE_VIDEO_CAPTURE));
1476 } 1484 }
1477 1485
1478 } // namespace chromeos 1486 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698