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

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

Issue 6773006: Add enableReferrers and enableHyperlinkAuditing to contentSettings.misc API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 9 years, 8 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
« no previous file with comments | « chrome/common/pref_names.cc ('k') | content/browser/tab_contents/tab_contents.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <script> 1 <script>
2 // Content settings API test 2 // Content settings API test
3 // Run with browser_tests --gtest_filter=ExtensionApiTest.ContentSettings 3 // Run with browser_tests --gtest_filter=ExtensionApiTest.ContentSettings
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.assertEq(expected, value, message); 8 chrome.test.assertEq(expected, value, message);
9 }); 9 });
10 } 10 }
11 chrome.test.runTests([ 11 chrome.test.runTests([
12 function getBlockThirdPartyCookies() { 12 function getBlockThirdPartyCookies() {
13 cs.misc.blockThirdPartyCookies.get( 13 cs.misc.blockThirdPartyCookies.get(
14 {}, 14 {},
15 expect({ 'value': true, 15 expect({ 'value': true,
16 'levelOfControl': "ControllableByThisExtension" }, 16 'levelOfControl': "ControllableByThisExtension" },
17 "third-party cookies should be blocked")); 17 "third-party cookies should be blocked"));
18 }, 18 },
19 function getEnableReferrers() {
20 cs.misc.enableReferrers.get(
21 {},
22 expect({ 'value': false,
23 'levelOfControl': "ControllableByThisExtension" },
24 "referrers should be disabled"));
25 },
19 function setBlockThirdPartyCookies() { 26 function setBlockThirdPartyCookies() {
20 cs.misc.blockThirdPartyCookies.set( 27 cs.misc.blockThirdPartyCookies.set(
21 {'value': false}, 28 {'value': false},
22 chrome.test.callbackPass()); 29 chrome.test.callbackPass());
30 },
31 function setEnableReferrers() {
32 cs.misc.enableReferrers.set(
33 {'value': true},
34 chrome.test.callbackPass());
23 } 35 }
24 ]); 36 ]);
25 </script> 37 </script>
OLDNEW
« no previous file with comments | « chrome/common/pref_names.cc ('k') | content/browser/tab_contents/tab_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698