cygprofile: increase timeouts to allow showing web contents
[chromium-blink-merge.git] / chrome / common / extensions / docs / server2 / manifest_features_test.py
blobc21286c30b0d81e466caad06641be5f4b8ce5bc0
1 #!/usr/bin/env python
2 # Copyright 2013 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
6 import unittest
8 from manifest_features import ConvertDottedKeysToNested
10 class ManifestFeaturesTest(unittest.TestCase):
11 def testConvertDottedKeysToNested(self):
12 docs = {
13 'doc1.sub2': {
14 'name': 'doc1.sub2'
16 'doc1': {
17 'name': 'doc1'
19 'doc2': {
20 'name': 'doc2'
22 'doc1.sub1.subsub1': {
23 'name': 'doc1.sub1.subsub1'
25 'doc1.sub1': {
26 'name': 'doc1.sub1'
30 expected_docs = {
31 'doc1': {
32 'name': 'doc1',
33 'children': {
34 'sub1': {
35 'name': 'sub1',
36 'children': {
37 'subsub1': {
38 'name' :'subsub1'
42 'sub2': {
43 'name': 'sub2'
47 'doc2': {
48 'name': 'doc2'
52 self.assertEqual(expected_docs, ConvertDottedKeysToNested(docs))
54 if __name__ == '__main__':
55 unittest.main()