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

Unified Diff: chrome/common/extensions/docs/server2/manifest_features_test.py

Issue 23867003: Docserver: Consolidate features caching and access. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no version bump Created 7 years, 3 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/common/extensions/docs/server2/manifest_features_test.py
diff --git a/chrome/common/extensions/docs/server2/manifest_features_test.py b/chrome/common/extensions/docs/server2/manifest_features_test.py
index 1d0074aa30892b04e0571e1c39ba44557ac4b785..c21286c30b0d81e466caad06641be5f4b8ce5bc0 100755
--- a/chrome/common/extensions/docs/server2/manifest_features_test.py
+++ b/chrome/common/extensions/docs/server2/manifest_features_test.py
@@ -5,7 +5,7 @@
import unittest
-from manifest_features import CreateManifestFeatures, ConvertDottedKeysToNested
+from manifest_features import ConvertDottedKeysToNested
class ManifestFeaturesTest(unittest.TestCase):
def testConvertDottedKeysToNested(self):
@@ -51,51 +51,5 @@ class ManifestFeaturesTest(unittest.TestCase):
self.assertEqual(expected_docs, ConvertDottedKeysToNested(docs))
- def testCreateManifestFeatures(self):
- features_json = {
- 'doc1': { 'extension_types': 'all' },
- 'doc2': { 'extension_types': ['extension', 'package_app'] }
- }
-
- manifest_json = {
- 'doc1': { 'example': {} },
- 'doc1.sub1': { 'example': [] }
- }
-
- expected = {
- 'doc1': {
- 'name': 'doc1',
- 'example': {},
- 'platforms': ['app', 'extension']
- },
- 'doc1.sub1': {
- 'example': [],
- 'name': 'doc1.sub1',
- 'platforms': []
- },
- 'doc2': {
- 'name': 'doc2',
- 'platforms': ['extension']
- }
- }
-
- expected_filtered = {
- 'doc1': {
- 'example': {},
- 'name': 'doc1',
- 'platforms': ['app', 'extension']
- }
- }
-
- self.assertEqual(expected, CreateManifestFeatures(
- features_json=features_json,
- manifest_json=manifest_json,
- filter_platform=None))
-
- self.assertEqual(expected_filtered, CreateManifestFeatures(
- features_json=features_json,
- manifest_json=manifest_json,
- filter_platform='app'))
-
if __name__ == '__main__':
unittest.main()

Powered by Google App Engine
This is Rietveld 408576698