| Index: chrome/test/data/extensions/api_test/preference/session_only_incognito/test.html
|
| diff --git a/chrome/test/data/extensions/api_test/content_settings/session_only_incognito/test.html b/chrome/test/data/extensions/api_test/preference/session_only_incognito/test.html
|
| similarity index 82%
|
| rename from chrome/test/data/extensions/api_test/content_settings/session_only_incognito/test.html
|
| rename to chrome/test/data/extensions/api_test/preference/session_only_incognito/test.html
|
| index accf7d8e88e8509e681e9c3fec22e279e476b624..f41693b0cf7c8936719a5b583b0004e76c72fa4c 100644
|
| --- a/chrome/test/data/extensions/api_test/content_settings/session_only_incognito/test.html
|
| +++ b/chrome/test/data/extensions/api_test/preference/session_only_incognito/test.html
|
| @@ -1,8 +1,8 @@
|
| <script>
|
| // Content settings API test
|
| -// Run with browser_tests --gtest_filter=ExtensionApiTest.SessionOnlyIncognitoContentSettings
|
| +// Run with browser_tests --gtest_filter=ExtensionApiTest.PreferenceSessionOnlyIncognito
|
|
|
| -var cs = chrome.experimental.contentSettings;
|
| +var pw = chrome.experimental.privacy.websites;
|
| function expect(expected, message) {
|
| return chrome.test.callbackPass(function(value) {
|
| chrome.test.assertNoLastError();
|
| @@ -11,14 +11,14 @@ function expect(expected, message) {
|
| }
|
| chrome.test.runTests([
|
| function getRegular() {
|
| - cs.global.thirdPartyCookiesAllowed.get(
|
| + pw.thirdPartyCookiesAllowed.get(
|
| {},
|
| expect({ 'value': true,
|
| 'levelOfControl': "controllable_by_this_extension" },
|
| "third-party cookies should not be blocked"));
|
| },
|
| function getIncognito() {
|
| - cs.global.thirdPartyCookiesAllowed.get(
|
| + pw.thirdPartyCookiesAllowed.get(
|
| { 'incognito': true },
|
| expect({ 'value': true,
|
| 'incognitoSpecific': false,
|
| @@ -26,19 +26,19 @@ chrome.test.runTests([
|
| "third-party cookies should not be blocked in incognito mode"));
|
| },
|
| function set() {
|
| - cs.global.thirdPartyCookiesAllowed.set(
|
| + pw.thirdPartyCookiesAllowed.set(
|
| { 'scope': 'incognito_persistent', 'value': false },
|
| chrome.test.callbackPass());
|
| },
|
| function getRegular2() {
|
| - cs.global.thirdPartyCookiesAllowed.get(
|
| + pw.thirdPartyCookiesAllowed.get(
|
| {},
|
| expect({ 'value': true,
|
| 'levelOfControl': "controllable_by_this_extension" },
|
| "third-party cookies should not be blocked"));
|
| },
|
| function getIncognito2() {
|
| - cs.global.thirdPartyCookiesAllowed.get(
|
| + pw.thirdPartyCookiesAllowed.get(
|
| { 'incognito': true },
|
| expect({ 'value': false,
|
| 'incognitoSpecific': true,
|
| @@ -48,7 +48,7 @@ chrome.test.runTests([
|
| // We cannot set session_only_persistent preferences if there is no incognito
|
| // session.
|
| function set2() {
|
| - cs.global.thirdPartyCookiesAllowed.set(
|
| + pw.thirdPartyCookiesAllowed.set(
|
| { 'scope': 'incognito_session_only', 'value': true },
|
| chrome.test.callbackFail("You cannot set a preference with scope " +
|
| "'incognito_session_only' when no incognito " +
|
| @@ -59,19 +59,19 @@ chrome.test.runTests([
|
| },
|
| // session_only_persistent overrides incognito_persistent.
|
| function set3() {
|
| - cs.global.thirdPartyCookiesAllowed.set(
|
| + pw.thirdPartyCookiesAllowed.set(
|
| { 'scope': 'incognito_session_only', 'value': true },
|
| chrome.test.callbackPass());
|
| },
|
| function getRegular3() {
|
| - cs.global.thirdPartyCookiesAllowed.get(
|
| + pw.thirdPartyCookiesAllowed.get(
|
| {},
|
| expect({ 'value': true,
|
| 'levelOfControl': "controllable_by_this_extension" },
|
| "third-party cookies should not be blocked"));
|
| },
|
| function getIncognito3() {
|
| - cs.global.thirdPartyCookiesAllowed.get(
|
| + pw.thirdPartyCookiesAllowed.get(
|
| { 'incognito': true },
|
| expect({ 'value': true,
|
| 'incognitoSpecific': true,
|
|
|