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

Unified Diff: trunk/src/chrome/common/extensions/docs/server2/manifest_data_source_test.py

Issue 14712010: Revert 199633 "Doc server manifest page generation" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 7 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: trunk/src/chrome/common/extensions/docs/server2/manifest_data_source_test.py
===================================================================
--- trunk/src/chrome/common/extensions/docs/server2/manifest_data_source_test.py (revision 199633)
+++ trunk/src/chrome/common/extensions/docs/server2/manifest_data_source_test.py (working copy)
@@ -1,128 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2013 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import json
-import unittest
-
-from compiled_file_system import CompiledFileSystem
-from manifest_data_source import ManifestDataSource
-from object_store_creator import ObjectStoreCreator
-from test_file_system import TestFileSystem
-
-file_system = TestFileSystem({
- "_manifest_features.json": json.dumps({
- 'req0': {
- 'extension_types': ['platform_app', 'extension']
- },
- 'req1': {
- 'extension_types': 'all'
- },
- 'opt0': {
- 'extension_types': ['extension']
- },
- 'opt1': {
- 'extension_types': ['hosted_app']
- },
- 'free0': {
- 'extension_types': ['platform_app']
- },
- 'free1': {
- 'extension_types': ['platform_app', 'hosted_app', 'extension']
- },
- 'only0': {
- 'extension_types': 'all'
- },
- 'only1': {
- 'extension_types': ['platform_app']
- },
- 'rec0': {
- 'extension_types': ['extension']
- },
- 'rec1': {
- 'extension_types': ['platform_app', 'extension']
- }
- }),
- "manifest.json": json.dumps({
- 'required': [
- {
- 'name': 'req0',
- 'example': 'Extension'
- },
- {'name': 'req1'}
- ],
- 'only_one': [
- {'name': 'only0'},
- {'name': 'only1'}
- ],
- 'recommended': [
- {'name': 'rec0'},
- {'name': 'rec1'}
- ],
- 'optional': [
- {'name': 'opt0'},
- {'name': 'opt1'}
- ]
- })
-})
-
-class ManifestDataSourceTest(unittest.TestCase):
- def testCreateManifestData(self):
- expected_extensions = {
- 'required': [
- {
- 'name': 'req0',
- 'example': 'Extension'
- },
- {'name': 'req1'}
- ],
- 'recommended': [
- {'name': 'rec0'},
- {'name': 'rec1'}
- ],
- 'only_one': [
- {'name': 'only0'}
- ],
- 'optional': [
- {'name': 'free1'},
- {
- 'name': 'opt0',
- 'is_last': True
- }
- ]
- }
-
- expected_apps = {
- 'required': [
- {
- 'name': 'req0',
- 'example': 'Application'
- },
- {'name': 'req1'}
- ],
- 'recommended': [
- {'name': 'rec1'}
- ],
- 'only_one': [
- {'name': 'only0'},
- {'name': 'only1'}
- ],
- 'optional': [
- {'name': 'free0'},
- {
- 'name': 'free1',
- 'is_last': True
- }
- ]
- }
-
- mds = ManifestDataSource(
- CompiledFileSystem.Factory(file_system, ObjectStoreCreator.ForTest()),
- file_system, 'manifest.json', '_manifest_features.json')
-
- self.assertEqual(expected_extensions, mds.get('extensions'))
- self.assertEqual(expected_apps, mds.get('apps'))
-
-if __name__ == '__main__':
- unittest.main()

Powered by Google App Engine
This is Rietveld 408576698