@@ -384,11 +384,11 @@ def run_test(self, logger, *tests, **params):
384
384
385
385
Possible optional test parameters:
386
386
387
- `bidi`:
388
- Boolean to indicate whether to test Firefox with BiDi protocol.
389
387
`binary`:
390
388
Path for the browser binary to use. Defaults to the local
391
389
build.
390
+ `cdp`:
391
+ Boolean to indicate whether to test Firefox with CDP protocol.
392
392
`headless`:
393
393
Boolean to indicate whether to activate Firefox' headless mode.
394
394
`extra_prefs`:
@@ -399,7 +399,7 @@ def run_test(self, logger, *tests, **params):
399
399
"""
400
400
setup ()
401
401
402
- with_bidi = params .get ("bidi " , False )
402
+ with_cdp = params .get ("cdp " , False )
403
403
binary = params .get ("binary" ) or self .get_binary_path ()
404
404
product = params .get ("product" , "firefox" )
405
405
@@ -444,7 +444,7 @@ def run_test(self, logger, *tests, **params):
444
444
".cache" ,
445
445
)
446
446
447
- if with_bidi is True :
447
+ if not with_cdp :
448
448
test_command = test_command + ":bidi"
449
449
elif env ["HEADLESS" ] == "True" :
450
450
test_command = test_command + ":headless"
@@ -488,7 +488,7 @@ def run_test(self, logger, *tests, **params):
488
488
expectation
489
489
for expectation in expected_data
490
490
if is_relevant_expectation (
491
- expectation , product , with_bidi , env ["HEADLESS" ], expected_platform
491
+ expectation , product , with_cdp , env ["HEADLESS" ], expected_platform
492
492
)
493
493
]
494
494
@@ -516,16 +516,16 @@ def create_parser_puppeteer():
516
516
p .add_argument (
517
517
"--product" , type = str , default = "firefox" , choices = ["chrome" , "firefox" ]
518
518
)
519
- p .add_argument (
520
- "--bidi" ,
521
- action = "store_true" ,
522
- help = "Flag that indicates whether to test Firefox with BiDi protocol." ,
523
- )
524
519
p .add_argument (
525
520
"--binary" ,
526
521
type = str ,
527
522
help = "Path to browser binary. Defaults to local Firefox build." ,
528
523
)
524
+ p .add_argument (
525
+ "--cdp" ,
526
+ action = "store_true" ,
527
+ help = "Flag that indicates whether to test Firefox with the CDP protocol." ,
528
+ )
529
529
p .add_argument (
530
530
"--ci" ,
531
531
action = "store_true" ,
@@ -575,7 +575,7 @@ def create_parser_puppeteer():
575
575
576
576
577
577
def is_relevant_expectation (
578
- expectation , expected_product , with_bidi , is_headless , expected_platform
578
+ expectation , expected_product , with_cdp , is_headless , expected_platform
579
579
):
580
580
parameters = expectation ["parameters" ]
581
581
@@ -584,11 +584,11 @@ def is_relevant_expectation(
584
584
else :
585
585
is_expected_product = "firefox" not in parameters
586
586
587
- if with_bidi is True :
587
+ if with_cdp :
588
+ is_expected_protocol = "webDriverBiDi" not in parameters
589
+ else :
588
590
is_expected_protocol = "cdp" not in parameters
589
591
is_headless = "True"
590
- else :
591
- is_expected_protocol = "webDriverBiDi" not in parameters
592
592
593
593
if is_headless == "True" :
594
594
is_expected_mode = "headful" not in parameters
@@ -620,8 +620,8 @@ def is_relevant_expectation(
620
620
)
621
621
def puppeteer_test (
622
622
command_context ,
623
- bidi = None ,
624
623
binary = None ,
624
+ cdp = False ,
625
625
ci = False ,
626
626
disable_fission = False ,
627
627
enable_webrender = False ,
@@ -683,8 +683,8 @@ def puppeteer_test(
683
683
install_puppeteer (command_context , product , ci )
684
684
685
685
params = {
686
- "bidi" : bidi ,
687
686
"binary" : binary ,
687
+ "cdp" : cdp ,
688
688
"headless" : headless ,
689
689
"enable_webrender" : enable_webrender ,
690
690
"extra_prefs" : prefs ,
0 commit comments