@@ -20,7 +20,6 @@ import (
20
20
"github.com/stretchr/testify/assert"
21
21
)
22
22
23
- type InitialHTMLFixture string
24
23
type BaseLocationFixture string
25
24
26
25
type AssertFixture struct {
@@ -55,21 +54,16 @@ func (f *HTTPHandlerFixture) Setup() {
55
54
type WindowFixture struct {
56
55
AssertFixture
57
56
* BaseLocationFixture
58
- InitialHTMLFixture
59
57
* HTTPHandlerFixture
60
58
Window htmltest.WindowHelper
61
59
62
- requests []* http.Request
63
- form html.HTMLFormElement
64
- actualRequest * http.Request
65
- submittedForm url.Values
60
+ form html.HTMLFormElement
66
61
}
67
62
68
63
func (f * WindowFixture ) Setup () {
69
64
if f .Window .Window != nil {
70
65
return
71
66
}
72
- fmt .Println ("Setup window" )
73
67
opts := html.WindowOptions {
74
68
HttpClient : gosthttp .NewHttpClientFromHandler (f .HTTPHandlerFixture ),
75
69
}
@@ -89,10 +83,16 @@ func (f *WindowFixture) Setup() {
89
83
))
90
84
}
91
85
86
+ type HandlerFixture struct {
87
+ }
88
+
92
89
type DefaultWindowFixture struct {
93
90
WindowFixture
94
91
* HTTPHandlerFixture
95
- initialized bool
92
+ initialized bool
93
+ actualRequest * http.Request
94
+ submittedForm url.Values
95
+ requests []* http.Request
96
96
}
97
97
98
98
func (f * DefaultWindowFixture ) Setup () {
@@ -342,11 +342,9 @@ func TestResubmitFormOn307Redirects(t *testing.T) {
342
342
submittedForm url.Values
343
343
)
344
344
345
- w , setup := fixture .Init (
346
- t ,
345
+ w , setup := fixture .Init (t ,
347
346
& struct {
348
347
HTMLFormSubmitInputFixture
349
- * HTTPHandlerFixture
350
348
* BaseLocationFixture
351
349
}{},
352
350
)
0 commit comments