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 |
| 11 FAKE_TABS_IDL = '\n'.join([ |
| 12 '// Copyleft stuff.', |
| 13 '', |
| 14 '// Some description here.', |
| 15 'namespace fakeTabs {', |
| 16 ' dictionary WasImplicitlyInlinedType {};', |
| 17 ' interface Functions {', |
| 18 ' static void myFunc(WasImplicitlyInlinedType arg);', |
| 19 ' static void anotherFunc(WasImplicitlyInlinedType arg);', |
| 20 ' };', |
| 21 '};']) |
| 22 |
| 23 FAKE_TABS_WITH_INLINING_IDL = '\n'.join([ |
| 24 '// Copyleft stuff.', |
| 25 '', |
| 26 '// Some description here.', |
| 27 'namespace fakeTabs {', |
| 28 ' dictionary WasImplicitlyInlinedType {};', |
| 29 ' interface Functions {', |
| 30 ' static void myFunc(WasImplicitlyInlinedType arg);', |
| 31 ' };', |
| 32 '};']) |
10 | 33 |
11 TABS_SCHEMA_BRANCHES = MoveAllTo(CHROME_EXTENSIONS, { | 34 TABS_SCHEMA_BRANCHES = MoveAllTo(CHROME_EXTENSIONS, { |
12 'trunk': { | 35 'trunk': { |
13 'docs': { | 36 'docs': { |
14 'templates': { | 37 'templates': { |
15 'json': { | 38 'json': { |
16 'api_availabilities.json': '{}', | 39 'api_availabilities.json': '{}', |
17 'intro_tables.json': '{}' | 40 'intro_tables.json': '{}' |
18 } | 41 } |
19 } | 42 } |
20 }, | 43 }, |
21 'api': { | 44 'api': { |
22 '_api_features.json': '{}', | 45 '_api_features.json': '{}', |
23 '_manifest_features.json': '{}', | 46 '_manifest_features.json': '{}', |
24 '_permission_features.json': '{}', | 47 '_permission_features.json': '{}', |
| 48 'fake_tabs.idl': FAKE_TABS_IDL, |
25 'tabs.json': json.dumps([{ | 49 'tabs.json': json.dumps([{ |
26 'namespace': 'tabs', | 50 'namespace': 'tabs', |
27 'types': [ | 51 'types': [ |
28 { | 52 { |
29 'id': 'Tab', | 53 'id': 'Tab', |
30 'type': 'any', | 54 'type': 'any', |
31 'properties': { | 55 'properties': { |
32 'url': { | 56 'url': { |
33 'type': 'any' | 57 'type': 'any' |
34 }, | 58 }, |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 } | 185 } |
162 ] | 186 ] |
163 }]) | 187 }]) |
164 } | 188 } |
165 }, | 189 }, |
166 '1500': { | 190 '1500': { |
167 'api': { | 191 'api': { |
168 '_api_features.json': "{}", | 192 '_api_features.json': "{}", |
169 '_manifest_features.json': "{}", | 193 '_manifest_features.json': "{}", |
170 '_permission_features.json': "{}", | 194 '_permission_features.json': "{}", |
| 195 'fake_tabs.idl': FAKE_TABS_IDL, |
171 'tabs.json': json.dumps([{ | 196 'tabs.json': json.dumps([{ |
172 'namespace': 'tabs', | 197 'namespace': 'tabs', |
173 'types': [ | 198 'types': [ |
174 { | 199 { |
175 'id': 'Tab', | 200 'id': 'Tab', |
176 'properties': { | 201 'properties': { |
177 'url': {}, | 202 'url': {}, |
178 'index': {}, | 203 'index': {}, |
179 'selected': {}, | 204 'selected': {}, |
180 'id': {}, | 205 'id': {}, |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 } | 283 } |
259 ] | 284 ] |
260 }]) | 285 }]) |
261 } | 286 } |
262 }, | 287 }, |
263 '1453': { | 288 '1453': { |
264 'api': { | 289 'api': { |
265 '_api_features.json': "{}", | 290 '_api_features.json': "{}", |
266 '_manifest_features.json': "{}", | 291 '_manifest_features.json': "{}", |
267 '_permission_features.json': "{}", | 292 '_permission_features.json': "{}", |
| 293 'fake_tabs.idl': FAKE_TABS_IDL, |
268 'tabs.json': json.dumps([{ | 294 'tabs.json': json.dumps([{ |
269 'namespace': 'tabs', | 295 'namespace': 'tabs', |
270 'types': [ | 296 'types': [ |
271 { | 297 { |
272 'id': 'Tab', | 298 'id': 'Tab', |
273 'properties': { | 299 'properties': { |
274 'url': {}, | 300 'url': {}, |
275 'index': {}, | 301 'index': {}, |
276 'selected': {}, | 302 'selected': {}, |
277 'id': {}, | 303 'id': {}, |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 ] | 376 ] |
351 } | 377 } |
352 ] | 378 ] |
353 }]) | 379 }]) |
354 } | 380 } |
355 }, | 381 }, |
356 '1410': { | 382 '1410': { |
357 'api': { | 383 'api': { |
358 '_manifest_features.json': "{}", | 384 '_manifest_features.json': "{}", |
359 '_permission_features.json': "{}", | 385 '_permission_features.json': "{}", |
| 386 'fake_tabs.idl': FAKE_TABS_IDL, |
360 'tabs.json': json.dumps([{ | 387 'tabs.json': json.dumps([{ |
361 'namespace': 'tabs', | 388 'namespace': 'tabs', |
362 'types': [ | 389 'types': [ |
363 { | 390 { |
364 'id': 'Tab', | 391 'id': 'Tab', |
365 'properties': { | 392 'properties': { |
366 'url': {}, | 393 'url': {}, |
367 'index': {}, | 394 'index': {}, |
368 'selected': {}, | 395 'selected': {}, |
369 'id': {}, | 396 'id': {}, |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 ] | 455 ] |
429 } | 456 } |
430 ] | 457 ] |
431 }]) | 458 }]) |
432 } | 459 } |
433 }, | 460 }, |
434 '1364': { | 461 '1364': { |
435 'api': { | 462 'api': { |
436 '_manifest_features.json': "{}", | 463 '_manifest_features.json': "{}", |
437 '_permission_features.json': "{}", | 464 '_permission_features.json': "{}", |
| 465 'fake_tabs.idl': FAKE_TABS_WITH_INLINING_IDL, |
438 'tabs.json': json.dumps([{ | 466 'tabs.json': json.dumps([{ |
439 'namespace': 'tabs', | 467 'namespace': 'tabs', |
440 'types': [ | 468 'types': [ |
441 { | 469 { |
442 'id': 'Tab', | 470 'id': 'Tab', |
443 'properties': { | 471 'properties': { |
444 'url': {}, | 472 'url': {}, |
445 'index': {}, | 473 'index': {}, |
446 'selected': {}, | 474 'selected': {}, |
447 'id': {}, | 475 'id': {}, |
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1158 ] | 1186 ] |
1159 }]) | 1187 }]) |
1160 } | 1188 } |
1161 }, | 1189 }, |
1162 '782': { | 1190 '782': { |
1163 'api': { | 1191 'api': { |
1164 'extension_api.json': "{}" | 1192 'extension_api.json': "{}" |
1165 } | 1193 } |
1166 } | 1194 } |
1167 }) | 1195 }) |
OLD | NEW |