@@ -58,7 +58,7 @@ func TestLifecycleWaitForNavigation(t *testing.T) {
58
58
}{
59
59
{
60
60
name : "load" ,
61
- pingSlowness : time . Millisecond * 100 ,
61
+ pingSlowness : 100 * time . Millisecond ,
62
62
pingJSSlow : false ,
63
63
waitUntil : common .LifecycleEventLoad ,
64
64
pingRequestTextAssert : func (result string , pingCount int ) {
@@ -70,7 +70,7 @@ func TestLifecycleWaitForNavigation(t *testing.T) {
70
70
},
71
71
{
72
72
name : "domcontentloaded" ,
73
- pingSlowness : time . Millisecond * 100 ,
73
+ pingSlowness : 100 * time . Millisecond ,
74
74
pingJSSlow : true ,
75
75
waitUntil : common .LifecycleEventDOMContentLoad ,
76
76
pingRequestTextAssert : func (result string , pingCount int ) {
@@ -216,7 +216,7 @@ func TestLifecycleWaitForLoadState(t *testing.T) {
216
216
}{
217
217
{
218
218
name : "load" ,
219
- pingSlowness : time . Millisecond * 100 ,
219
+ pingSlowness : 100 * time . Millisecond ,
220
220
pingJSSlow : false ,
221
221
waitUntil : common .LifecycleEventLoad ,
222
222
pingRequestTextAssert : func (result string ) {
@@ -228,7 +228,7 @@ func TestLifecycleWaitForLoadState(t *testing.T) {
228
228
},
229
229
{
230
230
name : "domcontentloaded" ,
231
- pingSlowness : time . Millisecond * 100 ,
231
+ pingSlowness : 100 * time . Millisecond ,
232
232
pingJSSlow : true ,
233
233
waitUntil : common .LifecycleEventDOMContentLoad ,
234
234
pingRequestTextAssert : func (result string ) {
@@ -260,7 +260,7 @@ func TestLifecycleWaitForLoadState(t *testing.T) {
260
260
// so that we wait until networkidle is received from
261
261
// the browser -- not relying on the persisted state in memory.
262
262
name : "domcontentloaded then networkidle" ,
263
- pingSlowness : time . Millisecond * 100 ,
263
+ pingSlowness : 100 * time . Millisecond ,
264
264
pingJSSlow : false ,
265
265
waitUntil : common .LifecycleEventDOMContentLoad ,
266
266
assertFunc : func (p api.Page ) {
@@ -331,7 +331,7 @@ func TestLifecycleReload(t *testing.T) {
331
331
}{
332
332
{
333
333
name : "load" ,
334
- pingSlowness : time . Millisecond * 100 ,
334
+ pingSlowness : 100 * time . Millisecond ,
335
335
pingJSSlow : false ,
336
336
waitUntil : common .LifecycleEventLoad ,
337
337
pingRequestTextAssert : func (result string , pingCount int ) {
@@ -343,7 +343,7 @@ func TestLifecycleReload(t *testing.T) {
343
343
},
344
344
{
345
345
name : "domcontentloaded" ,
346
- pingSlowness : time . Millisecond * 100 ,
346
+ pingSlowness : 100 * time . Millisecond ,
347
347
pingJSSlow : true ,
348
348
waitUntil : common .LifecycleEventDOMContentLoad ,
349
349
pingRequestTextAssert : func (result string , pingCount int ) {
@@ -424,7 +424,7 @@ func TestLifecycleGotoWithSubFrame(t *testing.T) {
424
424
}{
425
425
{
426
426
name : "load" ,
427
- pingSlowness : time . Millisecond * 100 ,
427
+ pingSlowness : 100 * time . Millisecond ,
428
428
pingJSSlow : false ,
429
429
waitUntil : common .LifecycleEventLoad ,
430
430
pingRequestTextAssert : func (result string ) {
@@ -436,7 +436,7 @@ func TestLifecycleGotoWithSubFrame(t *testing.T) {
436
436
},
437
437
{
438
438
name : "domcontentloaded" ,
439
- pingSlowness : time . Millisecond * 100 ,
439
+ pingSlowness : 100 * time . Millisecond ,
440
440
pingJSSlow : true ,
441
441
waitUntil : common .LifecycleEventDOMContentLoad ,
442
442
pingRequestTextAssert : func (result string ) {
@@ -505,7 +505,7 @@ func TestLifecycleGoto(t *testing.T) {
505
505
}{
506
506
{
507
507
name : "load" ,
508
- pingSlowness : time . Millisecond * 100 ,
508
+ pingSlowness : 100 * time . Millisecond ,
509
509
pingJSSlow : false ,
510
510
waitUntil : common .LifecycleEventLoad ,
511
511
pingRequestTextAssert : func (result string ) {
@@ -517,7 +517,7 @@ func TestLifecycleGoto(t *testing.T) {
517
517
},
518
518
{
519
519
name : "domcontentloaded" ,
520
- pingSlowness : time . Millisecond * 100 ,
520
+ pingSlowness : 100 * time . Millisecond ,
521
521
pingJSSlow : true ,
522
522
waitUntil : common .LifecycleEventDOMContentLoad ,
523
523
pingRequestTextAssert : func (result string ) {
@@ -591,7 +591,7 @@ func TestLifecycleGotoNetworkIdle(t *testing.T) {
591
591
592
592
withHomeHandler (t , tb , "prolonged_network_idle.html" )
593
593
ch := make (chan bool )
594
- withPingHandler (t , tb , time .Millisecond * 50 , ch )
594
+ withPingHandler (t , tb , 50 * time .Millisecond , ch )
595
595
withPingJSHandler (t , tb , false , ch , false )
596
596
597
597
assertHome (t , tb , p , common .LifecycleEventNetworkIdle , func () testPromise {
@@ -612,7 +612,7 @@ func TestLifecycleGotoNetworkIdle(t *testing.T) {
612
612
p := tb .NewPage (nil )
613
613
614
614
withHomeHandler (t , tb , "prolonged_network_idle_10.html" )
615
- withPingHandler (t , tb , time .Millisecond * 50 , nil )
615
+ withPingHandler (t , tb , 50 * time .Millisecond , nil )
616
616
617
617
assertHome (t , tb , p , common .LifecycleEventNetworkIdle , func () testPromise {
618
618
result := p .TextContent ("#pingRequestText" , nil )
0 commit comments