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

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

Issue 6480033: Implement experimental.contentSettings.misc.blockThirdPartyCookies. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 9 years, 10 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
(Empty)
1 <script>
2 // Content settings API test
3 // Run with browser_tests --gtest_filter=ExtensionApiTest.ContentSettings
4
5 var cs = chrome.experimental.contentSettings;
6 function expect(expected, message) {
7 return chrome.test.callbackPass(function(value) {
8 chrome.test.assertBool(value, expected, message);
9 });
10 }
11 chrome.test.runTests([
12 function testIncognito() {
13 cs.misc.blockThirdPartyCookies.get(
14 {}, expect(false, "third-party cookies should not be blocked"));
15 cs.misc.blockThirdPartyCookies.get(
16 { 'incognito': true },
17 expect(false,
18 "third-party cookies should not be blocked in incognito mode"));
19 cs.misc.blockThirdPartyCookies.set(
20 { 'incognito': true, 'value': true }, chrome.test.callbackPass());
21 cs.misc.blockThirdPartyCookies.get(
22 {}, expect(false, "third-party cookies should not be blocked"));
23 cs.misc.blockThirdPartyCookies.get(
24 { 'incognito': true },
25 expect(true,
26 "third-party cookies should be blocked in incognito mode"));
27 },
28 ]);
29 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698