| OLD | NEW |
| 1 <script> | 1 <!-- |
| 2 // Content settings API test | 2 * Copyright (c) 2011 The Chromium Authors. All rights reserved. Use of this |
| 3 // Run with browser_tests --gtest_filter=ExtensionApiTest.PreferenceClear | 3 * source code is governed by a BSD-style license that can be found in the |
| 4 | 4 * LICENSE file. |
| 5 var pw = chrome.experimental.privacy.websites; | 5 --> |
| 6 chrome.test.runTests([ | 6 <script src="test.js"></script> |
| 7 function getThirdPartyCookiesAllowed() { | |
| 8 pw.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 pw.thirdPartyCookiesAllowed.set( | |
| 21 {'value': true}, | |
| 22 chrome.test.callbackPass()); | |
| 23 }, | |
| 24 function clearThirdPartyCookiesAllowed() { | |
| 25 pw.thirdPartyCookiesAllowed.clear({}, chrome.test.callbackPass()); | |
| 26 }, | |
| 27 function getThirdPartyCookiesAllowed2() { | |
| 28 pw.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 |