Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(567)

Side by Side Diff: headless/lib/browser/devtools_api/client_api_generator_unittest.py

Issue 2854823006: headless: Remove deprecated DevTools domain bindings (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 2
3 # Copyright 2016 The Chromium Authors. All rights reserved. 3 # Copyright 2016 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 import client_api_generator 7 import client_api_generator
8 import shutil 8 import shutil
9 import sys 9 import sys
10 import tempfile 10 import tempfile
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 ], 507 ],
508 }, 508 },
509 ] 509 ]
510 }, 510 },
511 ] 511 ]
512 } 512 }
513 try: 513 try:
514 dirname = tempfile.mkdtemp() 514 dirname = tempfile.mkdtemp()
515 jinja_env = client_api_generator.InitializeJinjaEnv(dirname) 515 jinja_env = client_api_generator.InitializeJinjaEnv(dirname)
516 client_api_generator.CreateTypeDefinitions(json_api) 516 client_api_generator.CreateTypeDefinitions(json_api)
517 client_api_generator.Generate(jinja_env, dirname, json_api, 517 client_api_generator.GenerateDomains(jinja_env, dirname, json_api)
518 'deprecated_types', ['h'])
519 # This is just a smoke test; we don't actually verify the generated output 518 # This is just a smoke test; we don't actually verify the generated output
520 # here. 519 # here.
521 finally: 520 finally:
522 shutil.rmtree(dirname) 521 shutil.rmtree(dirname)
523 522
524 def test_GenerateDomains(self): 523 def test_GenerateDomains(self):
525 json_api = { 524 json_api = {
526 'domains': [ 525 'domains': [
527 { 526 {
528 'domain': 'domain0', 527 'domain': 'domain0',
(...skipping 22 matching lines...) Expand all
551 jinja_env, dirname, json_api, 550 jinja_env, dirname, json_api,
552 'domain', ['cc', 'h'], lambda domain_name: domain_name) 551 'domain', ['cc', 'h'], lambda domain_name: domain_name)
553 # This is just a smoke test; we don't actually verify the generated output 552 # This is just a smoke test; we don't actually verify the generated output
554 # here. 553 # here.
555 finally: 554 finally:
556 shutil.rmtree(dirname) 555 shutil.rmtree(dirname)
557 556
558 557
559 if __name__ == '__main__': 558 if __name__ == '__main__':
560 unittest.main(verbosity=2, exit=False, argv=sys.argv) 559 unittest.main(verbosity=2, exit=False, argv=sys.argv)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698