Chromium Code Reviews| 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, SERVER2 |
| 8 from test_file_system import MoveAllTo | 8 from test_file_system import MoveAllTo |
| 9 from test_util import ReadFile | |
| 9 | 10 |
| 10 | 11 |
| 11 TABS_SCHEMA_BRANCHES = MoveAllTo(CHROME_EXTENSIONS, { | 12 TABS_SCHEMA_BRANCHES = MoveAllTo(CHROME_EXTENSIONS, { |
| 12 'trunk': { | 13 'trunk': { |
| 13 'docs': { | 14 'docs': { |
| 14 'templates': { | 15 'templates': { |
| 15 'json': { | 16 'json': { |
| 16 'api_availabilities.json': '{}', | 17 'api_availabilities.json': '{}', |
| 17 'intro_tables.json': '{}' | 18 'intro_tables.json': '{}' |
| 18 } | 19 } |
| 19 } | 20 } |
| 20 }, | 21 }, |
| 21 'api': { | 22 'api': { |
| 22 '_api_features.json': '{}', | 23 '_api_features.json': '{}', |
| 23 '_manifest_features.json': '{}', | 24 '_manifest_features.json': '{}', |
| 24 '_permission_features.json': '{}', | 25 '_permission_features.json': '{}', |
| 26 'fake_tabs.idl': ReadFile(SERVER2, | |
| 27 'test_data', | |
| 28 'object_level_availability', | |
| 29 'fake_tabs.idl'), | |
| 25 'tabs.json': json.dumps([{ | 30 'tabs.json': json.dumps([{ |
| 26 'namespace': 'tabs', | 31 'namespace': 'tabs', |
| 27 'types': [ | 32 'types': [ |
| 28 { | 33 { |
| 29 'id': 'Tab', | 34 'id': 'Tab', |
| 30 'type': 'any', | 35 'type': 'any', |
| 31 'properties': { | 36 'properties': { |
| 32 'url': { | 37 'url': { |
| 33 'type': 'any' | 38 'type': 'any' |
| 34 }, | 39 }, |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 161 } | 166 } |
| 162 ] | 167 ] |
| 163 }]) | 168 }]) |
| 164 } | 169 } |
| 165 }, | 170 }, |
| 166 '1500': { | 171 '1500': { |
| 167 'api': { | 172 'api': { |
| 168 '_api_features.json': "{}", | 173 '_api_features.json': "{}", |
| 169 '_manifest_features.json': "{}", | 174 '_manifest_features.json': "{}", |
| 170 '_permission_features.json': "{}", | 175 '_permission_features.json': "{}", |
| 176 'fake_tabs.idl': ReadFile(SERVER2, | |
| 177 'test_data', | |
| 178 'object_level_availability', | |
| 179 'fake_tabs.idl'), | |
| 171 'tabs.json': json.dumps([{ | 180 'tabs.json': json.dumps([{ |
| 172 'namespace': 'tabs', | 181 'namespace': 'tabs', |
| 173 'types': [ | 182 'types': [ |
| 174 { | 183 { |
| 175 'id': 'Tab', | 184 'id': 'Tab', |
| 176 'properties': { | 185 'properties': { |
| 177 'url': {}, | 186 'url': {}, |
| 178 'index': {}, | 187 'index': {}, |
| 179 'selected': {}, | 188 'selected': {}, |
| 180 'id': {}, | 189 'id': {}, |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 258 } | 267 } |
| 259 ] | 268 ] |
| 260 }]) | 269 }]) |
| 261 } | 270 } |
| 262 }, | 271 }, |
| 263 '1453': { | 272 '1453': { |
| 264 'api': { | 273 'api': { |
| 265 '_api_features.json': "{}", | 274 '_api_features.json': "{}", |
| 266 '_manifest_features.json': "{}", | 275 '_manifest_features.json': "{}", |
| 267 '_permission_features.json': "{}", | 276 '_permission_features.json': "{}", |
| 277 'fake_tabs.idl': ReadFile(SERVER2, | |
| 278 'test_data', | |
| 279 'object_level_availability', | |
| 280 'fake_tabs.idl'), | |
| 268 'tabs.json': json.dumps([{ | 281 'tabs.json': json.dumps([{ |
| 269 'namespace': 'tabs', | 282 'namespace': 'tabs', |
| 270 'types': [ | 283 'types': [ |
| 271 { | 284 { |
| 272 'id': 'Tab', | 285 'id': 'Tab', |
| 273 'properties': { | 286 'properties': { |
| 274 'url': {}, | 287 'url': {}, |
| 275 'index': {}, | 288 'index': {}, |
| 276 'selected': {}, | 289 'selected': {}, |
| 277 'id': {}, | 290 'id': {}, |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 350 ] | 363 ] |
| 351 } | 364 } |
| 352 ] | 365 ] |
| 353 }]) | 366 }]) |
| 354 } | 367 } |
| 355 }, | 368 }, |
| 356 '1410': { | 369 '1410': { |
| 357 'api': { | 370 'api': { |
| 358 '_manifest_features.json': "{}", | 371 '_manifest_features.json': "{}", |
| 359 '_permission_features.json': "{}", | 372 '_permission_features.json': "{}", |
| 373 'fake_tabs.idl': ReadFile(SERVER2, | |
| 374 'test_data', | |
| 375 'object_level_availability', | |
| 376 'fake_tabs.idl'), | |
| 360 'tabs.json': json.dumps([{ | 377 'tabs.json': json.dumps([{ |
| 361 'namespace': 'tabs', | 378 'namespace': 'tabs', |
| 362 'types': [ | 379 'types': [ |
| 363 { | 380 { |
| 364 'id': 'Tab', | 381 'id': 'Tab', |
| 365 'properties': { | 382 'properties': { |
| 366 'url': {}, | 383 'url': {}, |
| 367 'index': {}, | 384 'index': {}, |
| 368 'selected': {}, | 385 'selected': {}, |
| 369 'id': {}, | 386 'id': {}, |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 428 ] | 445 ] |
| 429 } | 446 } |
| 430 ] | 447 ] |
| 431 }]) | 448 }]) |
| 432 } | 449 } |
| 433 }, | 450 }, |
| 434 '1364': { | 451 '1364': { |
| 435 'api': { | 452 'api': { |
| 436 '_manifest_features.json': "{}", | 453 '_manifest_features.json': "{}", |
| 437 '_permission_features.json': "{}", | 454 '_permission_features.json': "{}", |
| 455 'fake_tabs.idl': ReadFile(SERVER2, | |
| 456 'test_data', | |
| 457 'object_level_availability', | |
| 458 'fake_tabs_with_inlining.idl'), | |
|
not at google - send to devlin
2014/07/15 22:43:20
having a separate file for these is kinda overkill
| |
| 438 'tabs.json': json.dumps([{ | 459 'tabs.json': json.dumps([{ |
| 439 'namespace': 'tabs', | 460 'namespace': 'tabs', |
| 440 'types': [ | 461 'types': [ |
| 441 { | 462 { |
| 442 'id': 'Tab', | 463 'id': 'Tab', |
| 443 'properties': { | 464 'properties': { |
| 444 'url': {}, | 465 'url': {}, |
| 445 'index': {}, | 466 'index': {}, |
| 446 'selected': {}, | 467 'selected': {}, |
| 447 'id': {}, | 468 'id': {}, |
| (...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1158 ] | 1179 ] |
| 1159 }]) | 1180 }]) |
| 1160 } | 1181 } |
| 1161 }, | 1182 }, |
| 1162 '782': { | 1183 '782': { |
| 1163 'api': { | 1184 'api': { |
| 1164 'extension_api.json': "{}" | 1185 'extension_api.json': "{}" |
| 1165 } | 1186 } |
| 1166 } | 1187 } |
| 1167 }) | 1188 }) |
| OLD | NEW |