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

Unified Diff: headless/lib/browser/client_api_generator_unittest.py

Issue 1904073002: headless: Move hidden commands and events to experimental domains (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: headless/lib/browser/client_api_generator_unittest.py
diff --git a/headless/lib/browser/client_api_generator_unittest.py b/headless/lib/browser/client_api_generator_unittest.py
index 433d0d837b871b51cfd556bc43467273ffe1ddb4..e149fb426ff644199695cca8767d74fe8c3fd0fe 100644
--- a/headless/lib/browser/client_api_generator_unittest.py
+++ b/headless/lib/browser/client_api_generator_unittest.py
@@ -343,6 +343,31 @@ class ClientApiGeneratorTest(unittest.TestCase):
types = json_api['domains'][0]['types']
self.assertListEqual(types, expected_types)
+ def test_HideHiddenDomains(self):
+ json_api = {
+ 'domains': [
+ {
+ 'domain': 'domain',
+ 'hidden': True,
+ 'commands': [
+ {
+ 'name': 'FooCommand',
+ }
+ ],
+ 'events': [
+ {
+ 'name': 'BarEvent',
+ }
+ ]
+ }
+ ]
+ }
+ client_api_generator.HideHiddenDomains(json_api)
+ for command in json_api['domains'][0]['commands']:
+ self.assertTrue(command['hidden'])
+ for event in json_api['domains'][0]['events']:
+ self.assertTrue(command['hidden'])
+
def test_Generate(self):
json_api = {
'domains': [

Powered by Google App Engine
This is Rietveld 408576698