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

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

Issue 7298005: Expose privacy-relevant preferences via Chrome's extension API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebasing. Created 9 years, 3 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.ContentSettingsClear
4
5 var cs = chrome.experimental.contentSettings;
6 chrome.test.runTests([
7 function getThirdPartyCookiesAllowed() {
8 cs.global.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 cs.global.thirdPartyCookiesAllowed.set(
21 {'value': true},
22 chrome.test.callbackPass());
23 },
24 function clearThirdPartyCookiesAllowed() {
25 cs.global.thirdPartyCookiesAllowed.clear({}, chrome.test.callbackPass());
26 },
27 function getThirdPartyCookiesAllowed2() {
28 cs.global.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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698