@@ -34,75 +34,79 @@ suite(
3434 } )
3535 after ( async ( ) => await driver . quit ( ) )
3636
37- it ( 'sends Page.enable command using devtools' , async function ( ) {
38- const cdpConnection = await driver . createCDPConnection ( 'page' )
39- cdpConnection . execute ( 'Page.enable' , { } , function ( _res , err ) {
40- assert ( ! err )
41- } )
42- } )
43-
44- it ( 'sends Network and Page command using devtools' , async function ( ) {
45- const cdpConnection = await driver . createCDPConnection ( 'page' )
46- cdpConnection . execute ( 'Network.enable' , { } , function ( _res , err ) {
47- assert ( ! err )
37+ ignore ( browsers ( Browser . CHROME ) ) . it (
38+ 'sends Page.enable command using devtools' , async function ( ) {
39+ const cdpConnection = await driver . createCDPConnection ( 'page' )
40+ cdpConnection . execute ( 'Page.enable' , { } , function ( _res , err ) {
41+ assert ( ! err )
42+ } )
4843 } )
4944
50- cdpConnection . execute (
51- ' Page.navigate' ,
52- { url : 'chrome://newtab/' } ,
53- function ( _res , err ) {
45+ ignore ( browsers ( Browser . CHROME ) ) . it (
46+ 'sends Network and Page command using devtools' , async function ( ) {
47+ const cdpConnection = await driver . createCDPConnection ( 'page' )
48+ cdpConnection . execute ( 'Network.enable' , { } , function ( _res , err ) {
5449 assert ( ! err )
55- }
56- )
57- } )
50+ } )
51+
52+ cdpConnection . execute (
53+ 'Page.navigate' ,
54+ { url : 'chrome://newtab/' } ,
55+ function ( _res , err ) {
56+ assert ( ! err )
57+ }
58+ )
59+ } )
5860
5961 describe ( 'JS CDP events' , function ( ) {
60- it ( 'calls the event listener for console.log' , async function ( ) {
61- const cdpConnection = await driver . createCDPConnection ( 'page' )
62- await driver . onLogEvent ( cdpConnection , function ( event ) {
63- assert . strictEqual ( event [ 'args' ] [ 0 ] [ 'value' ] , 'here' )
62+ ignore ( browsers ( Browser . CHROME ) ) . it (
63+ 'calls the event listener for console.log' , async function ( ) {
64+ const cdpConnection = await driver . createCDPConnection ( 'page' )
65+ await driver . onLogEvent ( cdpConnection , function ( event ) {
66+ assert . strictEqual ( event [ 'args' ] [ 0 ] [ 'value' ] , 'here' )
67+ } )
68+ await driver . executeScript ( 'console.log("here")' )
6469 } )
65- await driver . executeScript ( 'console.log("here")' )
66- } )
6770
68- it ( 'calls the event listener for js exceptions' , async function ( ) {
69- const cdpConnection = await driver . createCDPConnection ( 'page' )
70- await driver . onLogException ( cdpConnection , function ( event ) {
71- assert . strictEqual (
72- event [ 'exceptionDetails' ] [ 'stackTrace' ] [ 'callFrames' ] [ 0 ] [
73- 'functionName'
74- ] ,
75- 'onmouseover'
76- )
71+ ignore ( browsers ( Browser . CHROME ) ) . it (
72+ 'calls the event listener for js exceptions' , async function ( ) {
73+ const cdpConnection = await driver . createCDPConnection ( 'page' )
74+ await driver . onLogException ( cdpConnection , function ( event ) {
75+ assert . strictEqual (
76+ event [ 'exceptionDetails' ] [ 'stackTrace' ] [ 'callFrames' ] [ 0 ] [
77+ 'functionName'
78+ ] ,
79+ 'onmouseover'
80+ )
81+ } )
82+ await driver . get ( Pages . javascriptPage )
83+ let element = driver . findElement ( { id : 'throwing-mouseover' } )
84+ await element . click ( )
7785 } )
78- await driver . get ( Pages . javascriptPage )
79- let element = driver . findElement ( { id : 'throwing-mouseover' } )
80- await element . click ( )
81- } )
8286 } )
8387
8488 describe ( 'JS DOM events' , function ( ) {
85- it ( 'calls the event listener on dom mutations' , async function ( ) {
86- const cdpConnection = await driver . createCDPConnection ( 'page' )
87- await driver . logMutationEvents ( cdpConnection , function ( event ) {
88- assert . strictEqual ( event [ 'attribute_name' ] , 'style' )
89- assert . strictEqual ( event [ 'current_value' ] , '' )
90- assert . strictEqual ( event [ 'old_value' ] , 'display:none;' )
91- } )
89+ ignore ( browsers ( Browser . CHROME ) ) . it (
90+ 'calls the event listener on dom mutations' , async function ( ) {
91+ const cdpConnection = await driver . createCDPConnection ( 'page' )
92+ await driver . logMutationEvents ( cdpConnection , function ( event ) {
93+ assert . strictEqual ( event [ 'attribute_name' ] , 'style' )
94+ assert . strictEqual ( event [ 'current_value' ] , '' )
95+ assert . strictEqual ( event [ 'old_value' ] , 'display:none;' )
96+ } )
9297
93- await driver . get ( fileServer . Pages . dynamicPage )
98+ await driver . get ( fileServer . Pages . dynamicPage )
9499
95- let element = driver . findElement ( { id : 'reveal' } )
96- await element . click ( )
97- let revealed = driver . findElement ( { id : 'revealed' } )
98- await driver . wait ( until . elementIsVisible ( revealed ) , 5000 )
99- } )
100+ let element = driver . findElement ( { id : 'reveal' } )
101+ await element . click ( )
102+ let revealed = driver . findElement ( { id : 'revealed' } )
103+ await driver . wait ( until . elementIsVisible ( revealed ) , 5000 )
104+ } )
100105 } )
101106
102107 describe ( 'Basic Auth Injection' , function ( ) {
103- ignore ( browsers ( Browser . SAFARI , Browser . FIREFOX ) ) . it (
104- 'denies entry if username and password do not match' ,
105- async function ( ) {
108+ ignore ( browsers ( Browser . SAFARI , Browser . FIREFOX , Browser . CHROME ) ) . it (
109+ 'denies entry if username and password do not match' , async function ( ) {
106110 const pageCdpConnection = await driver . createCDPConnection ( 'page' )
107111
108112 await driver . register ( 'random' , 'random' , pageCdpConnection )
@@ -115,7 +119,7 @@ suite(
115119 }
116120 )
117121
118- ignore ( browsers ( Browser . SAFARI , Browser . FIREFOX ) ) . it (
122+ ignore ( browsers ( Browser . SAFARI , Browser . FIREFOX , Browser . CHROME ) ) . it (
119123 'grants access if username and password are a match' ,
120124 async function ( ) {
121125 const pageCdpConnection = await driver . createCDPConnection ( 'page' )
@@ -150,5 +154,5 @@ suite(
150154 )
151155 } )
152156 } ,
153- { browsers : [ 'firefox' ] }
157+ { browsers : [ 'firefox' , 'chrome' ] }
154158)
0 commit comments