| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // Content settings API test | 5 // Content settings API test |
| 6 // Run with browser_tests --gtest_filter=ExtensionApiTest.PreferencePersistentIn
cognito | 6 // Run with browser_tests --gtest_filter=ExtensionApiTest.PreferencePersistentIn
cognito |
| 7 | 7 |
| 8 var pw = chrome.experimental.privacy.websites; | 8 var pw = chrome.privacy.websites; |
| 9 function expect(expected, message) { | 9 function expect(expected, message) { |
| 10 return chrome.test.callbackPass(function(value) { | 10 return chrome.test.callbackPass(function(value) { |
| 11 chrome.test.assertNoLastError(); | 11 chrome.test.assertNoLastError(); |
| 12 chrome.test.assertEq(expected, value, message); | 12 chrome.test.assertEq(expected, value, message); |
| 13 }); | 13 }); |
| 14 } | 14 } |
| 15 chrome.test.runTests([ | 15 chrome.test.runTests([ |
| 16 function getRegular() { | 16 function getRegular() { |
| 17 pw.thirdPartyCookiesAllowed.get( | 17 pw.thirdPartyCookiesAllowed.get( |
| 18 {}, | 18 {}, |
| (...skipping 23 matching lines...) Expand all Loading... |
| 42 }, | 42 }, |
| 43 function getIncognito2() { | 43 function getIncognito2() { |
| 44 pw.thirdPartyCookiesAllowed.get( | 44 pw.thirdPartyCookiesAllowed.get( |
| 45 { 'incognito': true }, | 45 { 'incognito': true }, |
| 46 expect({ 'value': false, | 46 expect({ 'value': false, |
| 47 'incognitoSpecific': true, | 47 'incognitoSpecific': true, |
| 48 'levelOfControl': "controlled_by_this_extension" }, | 48 'levelOfControl': "controlled_by_this_extension" }, |
| 49 "third-party cookies should be blocked in incognito mode")); | 49 "third-party cookies should be blocked in incognito mode")); |
| 50 }, | 50 }, |
| 51 ]); | 51 ]); |
| OLD | NEW |