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> |