This repository was archived by the owner on Jan 30, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -72,3 +72,36 @@ func TestFrameDismissDialogBox(t *testing.T) {
72
72
})
73
73
}
74
74
}
75
+
76
+ func TestFrameNoPanicWithEmbeddedIFrame (t * testing.T ) {
77
+ // This test only works when headless mode is false.
78
+ t .SkipNow ()
79
+
80
+ t .Parallel ()
81
+
82
+ b := newTestBrowser (t , withFileServer ())
83
+ p := b .NewPage (nil )
84
+
85
+ var result string
86
+ err := b .await (func () error {
87
+ opts := b .toGojaValue (struct {
88
+ WaitUntil string `js:"waitUntil"`
89
+ }{
90
+ WaitUntil : "load" ,
91
+ })
92
+ pageGoto := p .Goto (
93
+ b .staticURL ("embedded_iframe.html" ),
94
+ opts ,
95
+ )
96
+
97
+ b .promise (pageGoto ).
98
+ then (func () {
99
+ result = p .TextContent ("#doneDiv" , nil )
100
+ })
101
+
102
+ return nil
103
+ })
104
+ require .NoError (t , err )
105
+
106
+ assert .EqualValues (t , "Done!" , result )
107
+ }
Original file line number Diff line number Diff line change
1
+ < html >
2
+ < head > </ head >
3
+ < body >
4
+ < div id ='doneDiv '> </ div >
5
+ < iframe src ='https://www.youtube.com/embed/gwO7k5RTE54?wmode=opaque&enablejsapi=1 ' onload ='document.getElementById("doneDiv").innerText = "Done!" '> </ iframe >
6
+ </ body >
7
+ </ html >
You can’t perform that action at this time.
0 commit comments