Documentation
¶
Overview ¶
Package scripttests contains a specification of the behaviour of client-side scripting.
The tests are written targetting an interface; allowing different script engines to use the same suite of tests.
Index ¶
- Variables
- func RunSuites(t *testing.T, h html.ScriptHost)
- type EventLoopTestSuite
- func (s *EventLoopTestSuite) SetupTest()
- func (s *EventLoopTestSuite) TeardownTest()
- func (s *EventLoopTestSuite) TestClearTimeout()
- func (s *EventLoopTestSuite) TestDeferExecution()
- func (s *EventLoopTestSuite) TestDispatchError()
- func (s *EventLoopTestSuite) TestGlobals()
- func (s *EventLoopTestSuite) TestInterval()
- type GomegaSuite
- type LocationSuite
- type ScriptHostSuite
- type ScriptTestContext
- type ScriptTestSuite
- func (suite *ScriptTestSuite) CreateAllGinkgoTests()
- func (suite *ScriptTestSuite) CreateDocumentTests()
- func (suite *ScriptTestSuite) CreateEventTargetTests()
- func (suite *ScriptTestSuite) LoadHTML(h string) *ScriptTestContext
- func (suite *ScriptTestSuite) NewContext() *ScriptTestContext
- func (suite *ScriptTestSuite) NewWindow() html.Window
- type ScriptTestSuiteOption
- type UIEventTestSuite
- type WindowTestSuite
Constants ¶
This section is empty.
Variables ¶
View Source
var SkipDOM = func(s *ScriptTestSuite) { s.SkipDOM = true }
Functions ¶
Types ¶
type EventLoopTestSuite ¶ added in v0.3.0
func NewEventLoopTestSuite ¶ added in v0.3.0
func NewEventLoopTestSuite(host html.ScriptHost) *EventLoopTestSuite
func (*EventLoopTestSuite) SetupTest ¶ added in v0.3.0
func (s *EventLoopTestSuite) SetupTest()
func (*EventLoopTestSuite) TeardownTest ¶ added in v0.3.0
func (s *EventLoopTestSuite) TeardownTest()
func (*EventLoopTestSuite) TestClearTimeout ¶ added in v0.3.0
func (s *EventLoopTestSuite) TestClearTimeout()
func (*EventLoopTestSuite) TestDeferExecution ¶ added in v0.3.0
func (s *EventLoopTestSuite) TestDeferExecution()
func (*EventLoopTestSuite) TestDispatchError ¶ added in v0.3.0
func (s *EventLoopTestSuite) TestDispatchError()
func (*EventLoopTestSuite) TestGlobals ¶ added in v0.3.0
func (s *EventLoopTestSuite) TestGlobals()
func (*EventLoopTestSuite) TestInterval ¶ added in v0.3.0
func (s *EventLoopTestSuite) TestInterval()
type GomegaSuite ¶
func (*GomegaSuite) SetupTest ¶
func (s *GomegaSuite) SetupTest()
type LocationSuite ¶
type LocationSuite struct {
ScriptHostSuite
}
func NewLocationSuite ¶
func NewLocationSuite(h html.ScriptHost) *LocationSuite
func (*LocationSuite) TestGlobalScope ¶
func (s *LocationSuite) TestGlobalScope()
func (*LocationSuite) TestHrefEqualsDocumentLocation ¶ added in v0.3.0
func (s *LocationSuite) TestHrefEqualsDocumentLocation()
type ScriptHostSuite ¶
type ScriptHostSuite struct {
GomegaSuite
// contains filtered or unexported fields
}
func NewScriptHostSuite ¶
func NewScriptHostSuite(h html.ScriptHost) *ScriptHostSuite
func (*ScriptHostSuite) OpenWindow ¶ added in v0.3.0
func (s *ScriptHostSuite) OpenWindow(location string) html.Window
func (*ScriptHostSuite) SetupTest ¶
func (s *ScriptHostSuite) SetupTest()
func (*ScriptHostSuite) TeardownTest ¶
func (s *ScriptHostSuite) TeardownTest()
type ScriptTestContext ¶
type ScriptTestContext struct {
Window html.Window
matchers.ScriptMatchers
}
func (*ScriptTestContext) Clock ¶ added in v0.3.0
func (c *ScriptTestContext) Clock() html.Clock
func (*ScriptTestContext) Close ¶
func (ctx *ScriptTestContext) Close()
func (*ScriptTestContext) Run ¶
func (ctx *ScriptTestContext) Run(script string) error
type ScriptTestSuite ¶
type ScriptTestSuite struct {
Engine html.ScriptHost
Prefix string
SkipDOM bool
}
func NewScriptTestSuite ¶
func NewScriptTestSuite( engine html.ScriptHost, prefix string, options ...ScriptTestSuiteOption) *ScriptTestSuite
func (*ScriptTestSuite) CreateAllGinkgoTests ¶
func (suite *ScriptTestSuite) CreateAllGinkgoTests()
func (*ScriptTestSuite) CreateDocumentTests ¶
func (suite *ScriptTestSuite) CreateDocumentTests()
func (*ScriptTestSuite) CreateEventTargetTests ¶
func (suite *ScriptTestSuite) CreateEventTargetTests()
func (*ScriptTestSuite) LoadHTML ¶
func (suite *ScriptTestSuite) LoadHTML(h string) *ScriptTestContext
func (*ScriptTestSuite) NewContext ¶
func (suite *ScriptTestSuite) NewContext() *ScriptTestContext
func (*ScriptTestSuite) NewWindow ¶
func (suite *ScriptTestSuite) NewWindow() html.Window
type ScriptTestSuiteOption ¶
type ScriptTestSuiteOption func(*ScriptTestSuite)
type UIEventTestSuite ¶ added in v0.4.0
type UIEventTestSuite struct {
ScriptHostSuite
}
func NewUIEventTestSuite ¶ added in v0.4.0
func NewUIEventTestSuite(h html.ScriptHost) *UIEventTestSuite
func (*UIEventTestSuite) TestClickEventIsAPointerEvent ¶ added in v0.4.0
func (s *UIEventTestSuite) TestClickEventIsAPointerEvent()
func (*UIEventTestSuite) TestEventInheritance ¶ added in v0.4.0
func (s *UIEventTestSuite) TestEventInheritance()
type WindowTestSuite ¶ added in v0.4.0
type WindowTestSuite struct {
ScriptHostSuite
}
func NewWindowTestSuite ¶ added in v0.4.0
func NewWindowTestSuite(h html.ScriptHost) *WindowTestSuite
func (*WindowTestSuite) TestConstructorName ¶ added in v0.4.0
func (s *WindowTestSuite) TestConstructorName()
func (*WindowTestSuite) TestDOMContentLoaded ¶ added in v0.4.0
func (s *WindowTestSuite) TestDOMContentLoaded()
func (*WindowTestSuite) TestDocumentProperty ¶ added in v0.4.0
func (s *WindowTestSuite) TestDocumentProperty()
func (*WindowTestSuite) TestGlobalInstance ¶ added in v0.4.0
func (s *WindowTestSuite) TestGlobalInstance()
func (*WindowTestSuite) TestWindowConstructor ¶ added in v0.4.0
func (s *WindowTestSuite) TestWindowConstructor()
func (*WindowTestSuite) TestWindowInheritance ¶ added in v0.4.0
func (s *WindowTestSuite) TestWindowInheritance()
Click to show internal directories.
Click to hide internal directories.