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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/extensions/api_test/content_settings/incognito/test.html
diff --git a/chrome/test/data/extensions/api_test/content_settings/incognito/test.html b/chrome/test/data/extensions/api_test/content_settings/incognito/test.html
new file mode 100644
index 0000000000000000000000000000000000000000..e16d765be63af09a0ddd57411b0112c468cb5c1e
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/content_settings/incognito/test.html
@@ -0,0 +1,29 @@
+<script>
+// Content settings API test
+// Run with browser_tests --gtest_filter=ExtensionApiTest.ContentSettings
+
+var cs = chrome.experimental.contentSettings;
+function expect(expected, message) {
+ return chrome.test.callbackPass(function(value) {
+ chrome.test.assertBool(value, expected, message);
+ });
+}
+chrome.test.runTests([
+ function testIncognito() {
+ cs.misc.blockThirdPartyCookies.get(
+ {}, expect(false, "third-party cookies should not be blocked"));
+ cs.misc.blockThirdPartyCookies.get(
+ { 'incognito': true },
+ expect(false,
+ "third-party cookies should not be blocked in incognito mode"));
+ cs.misc.blockThirdPartyCookies.set(
+ { 'incognito': true, 'value': true }, chrome.test.callbackPass());
+ cs.misc.blockThirdPartyCookies.get(
+ {}, expect(false, "third-party cookies should not be blocked"));
+ cs.misc.blockThirdPartyCookies.get(
+ { 'incognito': true },
+ expect(true,
+ "third-party cookies should be blocked in incognito mode"));
+ },
+]);
+</script>

Powered by Google App Engine
This is Rietveld 408576698