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

Side by Side Diff: chrome/test/data/extensions/api_test/content_settings/incognito/test.html

Issue 7065033: Support persistent incognito preferences (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments Created 9 years, 7 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 | Annotate | Revision Log
OLDNEW
1 <script> 1 <script>
2 // Content settings API test 2 // Content settings API test
3 // Run with browser_tests --gtest_filter=ExtensionApiTest.IncognitoContentSettin gs 3 // Run with browser_tests --gtest_filter=ExtensionApiTest.IncognitoContentSettin gs
4 4
5 var cs = chrome.experimental.contentSettings; 5 var cs = chrome.experimental.contentSettings;
6 function expect(expected, message) { 6 function expect(expected, message) {
7 return chrome.test.callbackPass(function(value) { 7 return chrome.test.callbackPass(function(value) {
8 chrome.test.assertNoLastError(); 8 chrome.test.assertNoLastError();
9 chrome.test.assertEq(expected, value, message); 9 chrome.test.assertEq(expected, value, message);
10 }); 10 });
11 } 11 }
12 chrome.test.runTests([ 12 chrome.test.runTests([
13 function getRegular() { 13 function getRegular() {
14 cs.misc.blockThirdPartyCookies.get( 14 cs.misc.blockThirdPartyCookies.get(
15 {}, 15 {},
16 expect({ 'value': false, 16 expect({ 'value': false,
17 'levelOfControl': "ControllableByThisExtension" }, 17 'levelOfControl': "ControllableByThisExtension" },
18 "third-party cookies should not be blocked")); 18 "third-party cookies should not be blocked"));
19 }, 19 },
20 function getIncognito() { 20 function getIncognito() {
21 cs.misc.blockThirdPartyCookies.get( 21 cs.misc.blockThirdPartyCookies.get(
22 { 'incognito': true }, 22 { 'incognito': true },
23 expect({ 'value': false, 23 expect({ 'value': false,
24 'incognitoSpecific': false, 24 'incognitoSpecific': false,
25 'levelOfControl': "ControllableByThisExtension" }, 25 'levelOfControl': "ControllableByThisExtension" },
26 "third-party cookies should not be blocked in incognito mode")); 26 "third-party cookies should not be blocked in incognito mode"));
27 }, 27 },
28 // TODO(battre): re-enable when incognito preferences are available again.
29 /*
30 function set() { 28 function set() {
31 cs.misc.blockThirdPartyCookies.set( 29 cs.misc.blockThirdPartyCookies.set(
32 { 'incognito': true, 'value': true }, chrome.test.callbackPass()); 30 { 'scope': 'incognito_persistent', 'value': true },
31 chrome.test.callbackPass());
33 }, 32 },
34 function getRegular2() { 33 function getRegular2() {
35 cs.misc.blockThirdPartyCookies.get( 34 cs.misc.blockThirdPartyCookies.get(
36 {}, 35 {},
37 expect({ 'value': false, 36 expect({ 'value': false,
38 'levelOfControl': "ControllableByThisExtension" }, 37 'levelOfControl': "ControllableByThisExtension" },
39 "third-party cookies should not be blocked")); 38 "third-party cookies should not be blocked"));
40 }, 39 },
41 function getIncognito2() { 40 function getIncognito2() {
42 cs.misc.blockThirdPartyCookies.get( 41 cs.misc.blockThirdPartyCookies.get(
43 { 'incognito': true }, 42 { 'incognito': true },
44 expect({ 'value': true, 43 expect({ 'value': true,
45 'incognitoSpecific': true, 44 'incognitoSpecific': true,
46 'levelOfControl': "ControlledByThisExtension" }, 45 'levelOfControl': "ControlledByThisExtension" },
47 "third-party cookies should be blocked in incognito mode")); 46 "third-party cookies should be blocked in incognito mode"));
48 }, 47 },
49 */
50 ]); 48 ]);
51 </script> 49 </script>
OLDNEW
« no previous file with comments | « chrome/common/extensions/docs/samples.json ('k') | chrome/test/data/extensions/api_test/content_settings/onchange/test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698