| 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.PreferenceSessionOnlyI
ncognito | 6 // Run with browser_tests --gtest_filter=ExtensionApiTest.PreferenceSessionOnlyI
ncognito |
| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 }, | 75 }, |
| 76 function getIncognito3() { | 76 function getIncognito3() { |
| 77 pw.thirdPartyCookiesAllowed.get( | 77 pw.thirdPartyCookiesAllowed.get( |
| 78 { 'incognito': true }, | 78 { 'incognito': true }, |
| 79 expect({ 'value': true, | 79 expect({ 'value': true, |
| 80 'incognitoSpecific': true, | 80 'incognitoSpecific': true, |
| 81 'levelOfControl': "controlled_by_this_extension" }, | 81 'levelOfControl': "controlled_by_this_extension" }, |
| 82 "third-party cookies should be blocked in incognito mode")); | 82 "third-party cookies should be blocked in incognito mode")); |
| 83 }, | 83 }, |
| 84 ]); | 84 ]); |
| OLD | NEW |