| OLD | NEW |
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import json | 5 import json |
| 6 | 6 |
| 7 from extensions_paths import CHROME_EXTENSIONS | 7 from extensions_paths import CHROME_EXTENSIONS |
| 8 from test_file_system import MoveAllTo | 8 from test_file_system import MoveAllTo |
| 9 | 9 |
| 10 | 10 |
| 11 TABS_SCHEMA_BRANCHES = MoveAllTo(CHROME_EXTENSIONS, { | 11 TABS_SCHEMA_BRANCHES = MoveAllTo(CHROME_EXTENSIONS, { |
| 12 'trunk': { | 12 'trunk': { |
| 13 'docs': { | 13 'docs': { |
| 14 'templates': { | 14 'templates': { |
| 15 'json': { | 15 'json': { |
| 16 'api_availabilities.json': '{}' | 16 'api_availabilities.json': '{}', |
| 17 'intro_tables.json': '{}' |
| 17 } | 18 } |
| 18 } | 19 } |
| 19 }, | 20 }, |
| 20 'api': { | 21 'api': { |
| 21 '_api_features.json': '{}', | 22 '_api_features.json': '{}', |
| 22 '_manifest_features.json': '{}', | 23 '_manifest_features.json': '{}', |
| 23 '_permission_features.json': '{}', | 24 '_permission_features.json': '{}', |
| 24 'tabs.json': json.dumps([{ | 25 'tabs.json': json.dumps([{ |
| 25 'namespace': 'tabs', | 26 'namespace': 'tabs', |
| 26 'types': [ | 27 'types': [ |
| 27 { | 28 { |
| 28 'id': 'Tab', | 29 'id': 'Tab', |
| 30 'type': 'any', |
| 29 'properties': { | 31 'properties': { |
| 30 'url': {}, | 32 'url': { |
| 31 'index': {}, | 33 'type': 'any' |
| 32 'selected': {}, | 34 }, |
| 33 'id': {}, | 35 'index': { |
| 34 'windowId': {} | 36 'type': 'any' |
| 37 }, |
| 38 'selected': { |
| 39 'type': 'any' |
| 40 }, |
| 41 'id': { |
| 42 'type': 'any' |
| 43 }, |
| 44 'windowId': { |
| 45 'type': 'any' |
| 46 } |
| 35 } | 47 } |
| 36 }, | 48 }, |
| 37 { | 49 { |
| 50 'id': 'InlinedType', |
| 51 'type': 'any', |
| 52 'inline_doc': True |
| 53 }, |
| 54 { |
| 38 'id': 'InjectDetails', | 55 'id': 'InjectDetails', |
| 56 'type': 'any', |
| 39 'properties': { | 57 'properties': { |
| 40 'allFrames': {}, | 58 'allFrames': { |
| 41 'code': {}, | 59 'type': 'any' |
| 42 'file': {} | 60 }, |
| 61 'code': { |
| 62 'type': 'any' |
| 63 }, |
| 64 'file': { |
| 65 'type':'any' |
| 66 } |
| 43 } | 67 } |
| 44 } | 68 } |
| 45 ], | 69 ], |
| 46 'properties': { | 70 'properties': { |
| 47 'fakeTabsProperty1': {}, | 71 'fakeTabsProperty1': { |
| 48 'fakeTabsProperty2': {}, | 72 'type': 'any' |
| 49 'fakeTabsProperty3': {} | 73 }, |
| 74 'fakeTabsProperty2': { |
| 75 'type': 'any' |
| 76 }, |
| 77 'fakeTabsProperty3': { |
| 78 'type': 'any' |
| 79 } |
| 50 }, | 80 }, |
| 51 'functions': [ | 81 'functions': [ |
| 52 { | 82 { |
| 53 'name': 'getCurrent', | 83 'name': 'getCurrent', |
| 54 'parameters': [ | 84 'parameters': [ |
| 55 { | 85 { |
| 56 'name': 'callback', | 86 'name': 'callback', |
| 87 'type': 'function', |
| 57 'parameters': [ | 88 'parameters': [ |
| 58 { | 89 { |
| 59 'name': 'tab' | 90 'name': 'tab', |
| 91 'type': 'any' |
| 60 } | 92 } |
| 61 ] | 93 ] |
| 62 } | 94 } |
| 63 ] | 95 ] |
| 64 }, | 96 }, |
| 65 { | 97 { |
| 66 'name': 'get', | 98 'name': 'get', |
| 67 'parameters': [ | 99 'parameters': [ |
| 68 { | 100 { |
| 69 'name': 'callback', | 101 'name': 'callback', |
| 102 'type': 'function', |
| 70 'parameters': [ | 103 'parameters': [ |
| 71 { | 104 { |
| 72 'name': 'tab' | 105 'name': 'tab', |
| 106 'type': 'any' |
| 73 } | 107 } |
| 74 ] | 108 ] |
| 75 }, | 109 }, |
| 76 { | 110 { |
| 77 'name': 'tabId' | 111 'name': 'tabId', |
| 112 'type': 'any' |
| 78 } | 113 } |
| 79 ] | 114 ] |
| 80 } | 115 } |
| 81 ], | 116 ], |
| 82 'events': [ | 117 'events': [ |
| 83 { | 118 { |
| 84 'name': 'onActivated', | 119 'name': 'onActivated', |
| 120 'type': 'event', |
| 85 'parameters': [ | 121 'parameters': [ |
| 86 { | 122 { |
| 87 'name': 'activeInfo', | 123 'name': 'activeInfo', |
| 124 'type': 'any', |
| 88 'properties': { | 125 'properties': { |
| 89 'tabId': {}, | 126 'tabId': { |
| 90 'windowId': {} | 127 'type': 'any' |
| 128 }, |
| 129 'windowId': { |
| 130 'type': 'any' |
| 131 } |
| 91 } | 132 } |
| 92 } | 133 } |
| 93 ] | 134 ] |
| 94 }, | 135 }, |
| 95 { | 136 { |
| 96 'name': 'onUpdated', | 137 'name': 'onUpdated', |
| 138 'type': 'event', |
| 97 'parameters': [ | 139 'parameters': [ |
| 98 { | 140 { |
| 99 'name': 'tabId' | 141 'name': 'tabId', |
| 142 'type': 'any' |
| 100 }, | 143 }, |
| 101 { | 144 { |
| 102 'name': 'tab' | 145 'name': 'tab', |
| 146 'type': 'any' |
| 103 }, | 147 }, |
| 104 { | 148 { |
| 105 'name': 'changeInfo', | 149 'name': 'changeInfo', |
| 150 'type': 'any', |
| 106 'properties': { | 151 'properties': { |
| 107 'pinned': {}, | 152 'pinned': { |
| 108 'status': {} | 153 'type': 'any' |
| 154 }, |
| 155 'status': { |
| 156 'type': 'any' |
| 157 } |
| 109 } | 158 } |
| 110 } | 159 } |
| 111 ] | 160 ] |
| 112 } | 161 } |
| 113 ] | 162 ] |
| 114 }]) | 163 }]) |
| 115 } | 164 } |
| 116 }, | 165 }, |
| 117 '1500': { | 166 '1500': { |
| 118 'api': { | 167 'api': { |
| (...skipping 990 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1109 ] | 1158 ] |
| 1110 }]) | 1159 }]) |
| 1111 } | 1160 } |
| 1112 }, | 1161 }, |
| 1113 '782': { | 1162 '782': { |
| 1114 'api': { | 1163 'api': { |
| 1115 'extension_api.json': "{}" | 1164 'extension_api.json': "{}" |
| 1116 } | 1165 } |
| 1117 } | 1166 } |
| 1118 }) | 1167 }) |
| OLD | NEW |