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

Unified Diff: chrome/common/extensions/api/common_extension_api_unittest.cc

Issue 2255613003: Introduce session type parameter to extension features (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Introduce session type parameter to extension features Created 4 years, 4 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
« no previous file with comments | « no previous file | chrome/test/data/extensions/extension_api_unittest/api_features.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/api/common_extension_api_unittest.cc
diff --git a/chrome/common/extensions/api/common_extension_api_unittest.cc b/chrome/common/extensions/api/common_extension_api_unittest.cc
index 0c29cfcf5cdb9c0743b640c1a3e1397db4c4abef..7b3d1485fbc9c1514398c014d866db92f6833b19 100644
--- a/chrome/common/extensions/api/common_extension_api_unittest.cc
+++ b/chrome/common/extensions/api/common_extension_api_unittest.cc
@@ -200,7 +200,20 @@ TEST(ExtensionAPITest, APIFeatures) {
Feature::SESSION_TYPE_UNSPECIFIED, GURL()},
{"parent3.noparent.child", true, Feature::UNBLESSED_EXTENSION_CONTEXT,
Feature::SESSION_TYPE_UNSPECIFIED, GURL()},
- };
+
+ // Session types.
+ {"kiosk_only", true, Feature::BLESSED_EXTENSION_CONTEXT,
+ Feature::SESSION_TYPE_KIOSK, GURL()},
+ {"kiosk_only", false, Feature::BLESSED_EXTENSION_CONTEXT,
+ Feature::SESSION_TYPE_REGULAR, GURL()},
+ {"kiosk_only", false, Feature::BLESSED_EXTENSION_CONTEXT,
+ Feature::SESSION_TYPE_UNSPECIFIED, GURL()},
+ {"non_kiosk", false, Feature::BLESSED_EXTENSION_CONTEXT,
+ Feature::SESSION_TYPE_KIOSK, GURL()},
+ {"non_kiosk", true, Feature::BLESSED_EXTENSION_CONTEXT,
+ Feature::SESSION_TYPE_REGULAR, GURL()},
+ {"non_kiosk", false, Feature::BLESSED_EXTENSION_CONTEXT,
+ Feature::SESSION_TYPE_UNSPECIFIED, GURL()}};
base::FilePath api_features_path;
PathService::Get(chrome::DIR_TEST_DATA, &api_features_path);
@@ -301,7 +314,17 @@ TEST(ExtensionAPITest, IsAnyFeatureAvailableToContext) {
{"test7", true, Feature::WEB_PAGE_CONTEXT,
Feature::SESSION_TYPE_UNSPECIFIED, NULL, GURL("http://foo.com")},
{"test7", false, Feature::WEB_PAGE_CONTEXT,
- Feature::SESSION_TYPE_UNSPECIFIED, NULL, GURL("http://bar.com")}};
+ Feature::SESSION_TYPE_UNSPECIFIED, NULL, GURL("http://bar.com")},
+ {"kiosk_only", true, Feature::BLESSED_EXTENSION_CONTEXT,
+ Feature::SESSION_TYPE_KIOSK, extension.get(), GURL()},
+ {"kiosk_only", false, Feature::BLESSED_EXTENSION_CONTEXT,
+ Feature::SESSION_TYPE_REGULAR, extension.get(), GURL()},
+ {"non_kiosk", false, Feature::BLESSED_EXTENSION_CONTEXT,
+ Feature::SESSION_TYPE_KIOSK, extension.get(), GURL()},
+ {"non_kiosk", true, Feature::BLESSED_EXTENSION_CONTEXT,
+ Feature::SESSION_TYPE_REGULAR, extension.get(), GURL()},
+
+ };
base::FilePath api_features_path;
PathService::Get(chrome::DIR_TEST_DATA, &api_features_path);
« no previous file with comments | « no previous file | chrome/test/data/extensions/extension_api_unittest/api_features.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698