@@ -34,75 +34,79 @@ suite(
34
34
} )
35
35
after ( async ( ) => await driver . quit ( ) )
36
36
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
+ } )
48
43
} )
49
44
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 ) {
54
49
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
+ } )
58
60
59
61
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")' )
64
69
} )
65
- await driver . executeScript ( 'console.log("here")' )
66
- } )
67
70
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 ( )
77
85
} )
78
- await driver . get ( Pages . javascriptPage )
79
- let element = driver . findElement ( { id : 'throwing-mouseover' } )
80
- await element . click ( )
81
- } )
82
86
} )
83
87
84
88
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
+ } )
92
97
93
- await driver . get ( fileServer . Pages . dynamicPage )
98
+ await driver . get ( fileServer . Pages . dynamicPage )
94
99
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
+ } )
100
105
} )
101
106
102
107
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 ( ) {
106
110
const pageCdpConnection = await driver . createCDPConnection ( 'page' )
107
111
108
112
await driver . register ( 'random' , 'random' , pageCdpConnection )
@@ -115,7 +119,7 @@ suite(
115
119
}
116
120
)
117
121
118
- ignore ( browsers ( Browser . SAFARI , Browser . FIREFOX ) ) . it (
122
+ ignore ( browsers ( Browser . SAFARI , Browser . FIREFOX , Browser . CHROME ) ) . it (
119
123
'grants access if username and password are a match' ,
120
124
async function ( ) {
121
125
const pageCdpConnection = await driver . createCDPConnection ( 'page' )
@@ -150,5 +154,5 @@ suite(
150
154
)
151
155
} )
152
156
} ,
153
- { browsers : [ 'firefox' ] }
157
+ { browsers : [ 'firefox' , 'chrome' ] }
154
158
)
0 commit comments