@@ -47,11 +47,28 @@ const expectations = {
47
47
'network-requests' : {
48
48
details : {
49
49
items : {
50
- // We want to make sure we are finding the iframe's requests (paulirish.com) *AND*
51
- // the iframe's iframe's iframe's requests (youtube.com/doubleclick/etc).
52
- // - paulirish.com ~40-60 requests
53
- // - paulirish.com + all descendant iframes ~80-90 requests
54
- length : '>70' ,
50
+ // We want to make sure we are finding the iframe's requests (paulirish.com) *AND*
51
+ // the iframe's iframe's iframe's requests (youtube.com/doubleclick/etc).
52
+ _includes : [
53
+ { url : 'http://localhost:10200/oopif-requests.html' , finished : true , statusCode : 200 , resourceType : 'Document' } ,
54
+
55
+ // Paulirish iframe and subresource
56
+ { url : 'https://www.paulirish.com/2012/why-moving-elements-with-translate-is-better-than-posabs-topleft/' , finished : true , statusCode : 200 , resourceType : 'Document' } ,
57
+ { url : 'https://www.paulirish.com/avatar150.jpg' , finished : true , statusCode : 200 , resourceType : 'Image' } ,
58
+ { url : 'https://www.googletagmanager.com/gtag/js?id=G-PGXNGYWP8E' , finished : true , statusCode : 200 , resourceType : 'Script' } ,
59
+ { url : / ^ h t t p s : \/ \/ f o n t s \. g o o g l e a p i s \. c o m \/ c s s / , finished : true , statusCode : 200 , resourceType : 'Stylesheet' } ,
60
+
61
+ // Youtube iframe (OOPIF) and some subresources
62
+ // FYI: Youtube has a ServiceWorker which sometimes cancels the document request. As a result, there will sometimes be multiple requests for this file.
63
+ { url : 'https://www.youtube.com/embed/NZelrwd_iRs' , finished : true , statusCode : 200 , resourceType : 'Document' } ,
64
+ { url : / ^ h t t p s : \/ \/ w w w \. y o u t u b e \. c o m \/ .* ?p l a y e r .* ?c s s / , finished : true , statusCode : 200 , resourceType : 'Stylesheet' } ,
65
+ { url : / ^ h t t p s : \/ \/ w w w \. y o u t u b e \. c o m \/ .* ?\/ e m b e d .j s / , finished : true , statusCode : 200 , resourceType : 'Script' } ,
66
+
67
+ // Disqus iframe (OOPIF)
68
+ { url : / ^ h t t p s : \/ \/ d i s q u s \. c o m \/ e m b e d \/ c o m m e n t s \/ / , finished : true , statusCode : 200 , resourceType : 'Document' } ,
69
+ // Disqus subframe (that's a new OOPIF)
70
+ { url : 'https://accounts.google.com/o/oauth2/iframe' , finished : true , statusCode : 200 , resourceType : 'Document' } ,
71
+ ] ,
55
72
} ,
56
73
} ,
57
74
} ,
0 commit comments