Left: | ||
Right: |
LEFT | RIGHT |
---|---|
1 # This Source Code Form is subject to the terms of the Mozilla Public | 1 # This Source Code Form is subject to the terms of the Mozilla Public |
2 # License, v. 2.0. If a copy of the MPL was not distributed with this | 2 # License, v. 2.0. If a copy of the MPL was not distributed with this |
3 # file, You can obtain one at http://mozilla.org/MPL/2.0/. | 3 # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
4 | 4 |
5 import difflib | 5 import difflib |
6 import json | 6 import json |
7 import os | 7 import os |
8 import re | 8 import re |
9 import shutil | 9 import shutil |
10 import zipfile | 10 import zipfile |
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
427 key = None | 427 key = None |
428 | 428 |
429 manifests = { | 429 manifests = { |
430 'gecko': [('', 'manifest', 'json')], | 430 'gecko': [('', 'manifest', 'json')], |
431 'chrome': [('', 'manifest', 'json')], | 431 'chrome': [('', 'manifest', 'json')], |
432 } | 432 } |
433 | 433 |
434 if not devenv: | 434 if not devenv: |
435 manifests['edge'] = [ | 435 manifests['edge'] = [ |
436 ('', 'AppxManifest', 'xml'), | 436 ('', 'AppxManifest', 'xml'), |
437 ('Extension', 'manifest', 'json')] | 437 ('Extension', 'manifest', 'json'), |
Sebastian Noack
2018/08/08 19:19:04
Nit: The closing square bracket go on a new line,
tlucas
2018/08/08 22:10:07
Done.
| |
438 ] | |
438 else: | 439 else: |
439 manifests['edge'] = [('', 'manifest', 'json')] | 440 manifests['edge'] = [('', 'manifest', 'json')] |
440 | 441 |
441 filenames = { | 442 filenames = { |
442 'gecko': 'adblockplusfirefox-1.2.3{}.xpi', | 443 'gecko': 'adblockplusfirefox-1.2.3{}.xpi', |
443 'chrome': 'adblockpluschrome-1.2.3{{}}.{}'.format( | 444 'chrome': 'adblockpluschrome-1.2.3{{}}.{}'.format( |
444 {True: 'crx', False: 'zip'}[release], | 445 {True: 'crx', False: 'zip'}[release], |
445 ), | 446 ), |
446 'edge': 'adblockplusedge-1.2.3{}.appx', | 447 'edge': 'adblockplusedge-1.2.3{}.appx', |
447 } | 448 } |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
494 expected = os.path.join( | 495 expected = os.path.join( |
495 os.path.dirname(__file__), | 496 os.path.dirname(__file__), |
496 'expecteddata', | 497 'expecteddata', |
497 filename.format(name, ext), | 498 filename.format(name, ext), |
498 ) | 499 ) |
499 | 500 |
500 assert_manifest_content( | 501 assert_manifest_content( |
501 package.read(os.path.join(folder, '{}.{}'.format(name, ext))), | 502 package.read(os.path.join(folder, '{}.{}'.format(name, ext))), |
502 expected, | 503 expected, |
503 ) | 504 ) |
LEFT | RIGHT |