| OLD | NEW |
| (Empty) |
| 1 <script> | |
| 2 // Content settings API test | |
| 3 // Run with browser_tests --gtest_filter=ExtensionApiTest.ContentSettingsClear | |
| 4 | |
| 5 var cs = chrome.experimental.contentSettings; | |
| 6 chrome.test.runTests([ | |
| 7 function getThirdPartyCookiesAllowed() { | |
| 8 cs.global.thirdPartyCookiesAllowed.get({}, chrome.test.callbackPass( | |
| 9 function(allowed) { | |
| 10 chrome.test.assertEq( | |
| 11 allowed, | |
| 12 { | |
| 13 'value': false, | |
| 14 'levelOfControl': "controllable_by_this_extension" | |
| 15 }, | |
| 16 "third-party cookies should be blocked"); | |
| 17 })); | |
| 18 }, | |
| 19 function setThirdPartyCookiesAllowed() { | |
| 20 cs.global.thirdPartyCookiesAllowed.set( | |
| 21 {'value': true}, | |
| 22 chrome.test.callbackPass()); | |
| 23 }, | |
| 24 function clearThirdPartyCookiesAllowed() { | |
| 25 cs.global.thirdPartyCookiesAllowed.clear({}, chrome.test.callbackPass()); | |
| 26 }, | |
| 27 function getThirdPartyCookiesAllowed2() { | |
| 28 cs.global.thirdPartyCookiesAllowed.get({}, chrome.test.callbackPass( | |
| 29 function(allowed) { | |
| 30 chrome.test.assertEq( | |
| 31 allowed, | |
| 32 { | |
| 33 'value': false, | |
| 34 'levelOfControl': "controllable_by_this_extension" | |
| 35 }, | |
| 36 "third-party cookies should be blocked"); | |
| 37 })); | |
| 38 } | |
| 39 ]); | |
| 40 </script> | |
| OLD | NEW |