From VisualWorks®, 7.5 of April 16, 2007 on September 28, 2007 at 9:09:28 pm (Dialog confirm: 'You are filing-in a Parcel source file!\\While this is possible it will not have\the same effect as loading the parcel.\None of the Parcel''s prerequisites will\be loaded and none of its load actions\will be performed.\\Are you sure you want to file-in?' withCRs) ifFalse: [self error: 'Parcel file-in abandoned. Choose terminate or close.'] <class> <name>SCTestComponent7</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none <imports></imports> <category>SeasideTesting-Examples</category> <attributes> <package>SeasideTesting-Examples</package> </attributes> </class> <class> <name>SCTestCaseMain</name> <environment>Seaside</environment> <super>Seaside.WARenderLoopMain</super> <private>false</private> none <imports></imports> <category>SeasideTesting-TestRunner</category> <attributes> <package>SeasideTesting-TestRunner</package> </attributes> </class> <class> <name>SCTestComponent4</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none firstSent secondSent thirdSent <imports></imports> <category>SeasideTesting-Examples</category> <attributes> <package>SeasideTesting-Examples</package> </attributes> </class> <class> <name>SCTesterApplication</name> <environment>Seaside</environment> <super>Seaside.WAApplication</super> <private>false</private> none testCase <imports></imports> <category>SeasideTesting-Core</category> <attributes> <package>SeasideTesting-Core</package> </attributes> </class> <comment> Seaside.SCTesterApplication
Components under test use instances of SCTesterApplication for their application class. This needed to: 1) expose handlerWithKey: 2) provide the test case with the opportunity to interfere with session creation.
</comment> <class> <name>SCRunnerTask</name> <environment>Seaside</environment> <super>Seaside.WATask</super> <private>false</private> none componentClass initializationBlock createComponentBlock answerChecker checker component <imports></imports> <category>SeasideTesting-Core</category> <attributes> <package>SeasideTesting-Core</package> </attributes> </class> <class> <name>SCAnswerChecker</name> <environment>Seaside</environment> <super>Seaside.WADecoration</super> <private>false</private> none hasAnswer answerValue <imports></imports> <category>SeasideTesting-Core</category> <attributes> <package>SeasideTesting-Core</package> </attributes> </class> <class> <name>SCTestHistoryContentView</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none page <imports></imports> <category>SeasideTesting-TestRunner</category> <attributes> <package>SeasideTesting-TestRunner</package> </attributes> </class> <class> <name>SCComponentTestCase</name> <environment>Seaside</environment> <super>XProgramming.SUnit.TestCase</super> <private>false</private> none app browser pseudomain handler debugging responseSema runnerTask <imports></imports> <category>SeasideTesting-Core</category> <attributes> <package>SeasideTesting-Core</package> </attributes> </class> <class> <name>SCFormDemoTest</name> <environment>Seaside</environment> <super>Seaside.SCComponentTestCase</super> <private>false</private> none <imports></imports> <category>SeasideTesting-Examples</category> <attributes> <package>SeasideTesting-Examples</package> </attributes> </class> <class> <name>SCSampleComponentTest</name> <environment>Seaside</environment> <super>Seaside.SCComponentTestCase</super> <private>false</private> none <imports></imports> <category>SeasideTesting-Examples</category> <attributes> <package>SeasideTesting-Examples</package> </attributes> </class> <class> <name>WAAllTestsTest</name> <environment>Seaside</environment> <super>Seaside.SCComponentTestCase</super> <private>false</private> none <imports></imports> <category>SeasideTesting-Examples</category> <attributes> <package>SeasideTesting-Examples</package> </attributes> </class> <class> <name>WAMiniCalendarTest</name> <environment>Seaside</environment> <super>Seaside.SCComponentTestCase</super> <private>false</private> none <imports></imports> <category>SeasideTesting-Examples</category> <attributes> <package>SeasideTesting-Examples</package> </attributes> </class> <class> <name>SCFormDemo</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none name age <imports></imports> <category>SeasideTesting-Examples</category> <attributes> <package>SeasideTesting-Examples</package> </attributes> </class> <class> <name>SCDoNothingTaskTest</name> <environment>Seaside</environment> <super>Seaside.SCComponentTestCase</super> <private>false</private> none <imports></imports> <category>SeasideTesting-Examples</category> <attributes> <package>SeasideTesting-Examples</package> </attributes> </class> <class> <name>SCSetBacktrackingComponent</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none set value <imports></imports> <category>SeasideTesting-Examples</category> <attributes> <package>SeasideTesting-Examples</package> </attributes> </class> <class> <name>SCTestComponent3</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none field1 field2 button1WasPressed button2WasPressed <imports></imports> <category>SeasideTesting-Examples</category> <attributes> <package>SeasideTesting-Examples</package> </attributes> </class> <class> <name>SCExceptionDuringRenderingTest</name> <environment>Seaside</environment> <super>Seaside.SCComponentTestCase</super> <private>false</private> none <imports></imports> <category>SeasideTesting-Examples</category> <attributes> <package>SeasideTesting-Examples</package> </attributes> </class> <class> <name>SCTestRunnerFiles</name> <environment>Seaside</environment> <super>Seaside.WAFileLibrary</super> <private>false</private> none <imports></imports> <category>SeasideTesting-TestRunner</category> <attributes> <package>SeasideTesting-TestRunner</package> </attributes> </class> <class> <name>SCDoNothingTask</name> <environment>Seaside</environment> <super>Seaside.WATask</super> <private>false</private> none <imports></imports> <category>SeasideTesting-Examples</category> <attributes> <package>SeasideTesting-Examples</package> </attributes> </class> <class> <name>SCInputWithLabelTest</name> <environment>Seaside</environment> <super>Seaside.SCComponentTestCase</super> <private>false</private> none <imports></imports> <category>SeasideTesting-Examples</category> <attributes> <package>SeasideTesting-Examples</package> </attributes> </class> <class> <name>SAXHandler</name> <environment>Smalltalk</environment> <super>XML.SAXDriver</super> <private>false</private> none document <imports></imports> <category>SeasideTesting-VW</category> <attributes> <package>SeasideTesting-VW</package> </attributes> </class> <comment> SAXHandler
This class is needed by SeasideTesting as a superclass of SCxxx, otherwise the oackage wouldn't load. At the moment I do not know where to place this class is the hierarchy. It looks to me that there is no VW equivalent and we may have to copy the entire class from Squeak.
</comment> <class> <name>SCSeasideResponseParser</name> <environment>Seaside</environment> <super>SAXHandler</super> <private>false</private> none stack response currentForm currentSelect <imports></imports> <category>SeasideTesting-Core</category> <attributes> <package>SeasideTesting-Core</package> </attributes> </class> <class> <name>WAYesOrNoDialogTest</name> <environment>Seaside</environment> <super>Seaside.SCComponentTestCase</super> <private>false</private> none <imports></imports> <category>SeasideTesting-Examples</category> <attributes> <package>SeasideTesting-Examples</package> </attributes> </class> <class> <name>HttpResponse</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none response <imports></imports> <category>SeasideTesting-VW</category> <attributes> <package>SeasideTesting-VW</package> </attributes> </class> <class> <name>SCSetBacktrackingTest</name> <environment>Seaside</environment> <super>Seaside.SCComponentTestCase</super> <private>false</private> none <imports></imports> <category>SeasideTesting-Examples</category> <attributes> <package>SeasideTesting-Examples</package> </attributes> </class> <comment> Seaside.SCSetBacktrackingTest
Test whether Set instances are properly backtracked or not. This test will probably not pass unless my extensions to Set in the package SC are loaded. Beware, if you don't pass this test then don't trust that Set instances are properly backtracked by Seaside.
</comment> <class> <name>SCTestCaseViewer</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none filterString <imports></imports> <category>SeasideTesting-TestRunner</category> <attributes> <package>SeasideTesting-TestRunner</package> </attributes> </class> <class> <name>SCRenderLoop</name> <environment>Seaside</environment> <super>Seaside.WARenderLoop</super> <private>false</private> none <imports></imports> <category>SeasideTesting-Core</category> <attributes> <package>SeasideTesting-Core</package> </attributes> </class> <class> <name>SCBrowserSimulator</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none history cookies responseSema baseUrl <imports></imports> <category>SeasideTesting-Core</category> <attributes> <package>SeasideTesting-Core</package> </attributes> </class> <class> <name>SCExceptionDuringCallbackTest</name> <environment>Seaside</environment> <super>Seaside.SCComponentTestCase</super> <private>false</private> none <imports></imports> <category>SeasideTesting-Examples</category> <attributes> <package>SeasideTesting-Examples</package> </attributes> </class> <class> <name>SCAnchorDemoTest</name> <environment>Seaside</environment> <super>Seaside.SCComponentTestCase</super> <private>false</private> none <imports></imports> <category>SeasideTesting-Examples</category> <attributes> <package>SeasideTesting-Examples</package> </attributes> </class> <class> <name>XMLDOMParser</name> <environment>Seaside</environment> <super>XML.XMLParser</super> <private>false</private> none <imports></imports> <category>SeasideTesting-VW</category> <attributes> <package>SeasideTesting-VW</package> </attributes> </class> <class> <name>SCFileDownloadComponentTest</name> <environment>Seaside</environment> <super>Seaside.SCComponentTestCase</super> <private>false</private> none <imports></imports> <category>SeasideTesting-Examples</category> <attributes> <package>SeasideTesting-Examples</package> </attributes> </class> <comment> Seaside.SCFileDownloadComponentTest
Thanks to Liliana Ivan for furnishing this test case.
</comment> <class> <name>SCExceptionDuringCallback</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none <imports></imports> <category>SeasideTesting-Examples</category> <attributes> <package>SeasideTesting-Examples</package> </attributes> </class> <class> <name>SCTestComponent1</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none <imports></imports> <category>SeasideTesting-Examples</category> <attributes> <package>SeasideTesting-Examples</package> </attributes> </class> <class> <name>HttpRequest</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none request <imports></imports> <category>SeasideTesting-VW</category> <attributes> <package>SeasideTesting-VW</package> </attributes> </class> <class> <name>SeasidePortStrategyTesting</name> <environment>Smalltalk</environment> <super>SeasidePortStrategy</super> <private>false</private> objects <imports></imports> <category>Seaside/VW Support</category> <attributes> <package>SeasideTesting-VW</package> </attributes> </class> <class> <name>SCAnchorDemo</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none <imports></imports> <category>SeasideTesting-Examples</category> <attributes> <package>SeasideTesting-Examples</package> </attributes> </class> <class> <name>SCTestComponent5</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none <imports></imports> <category>SeasideTesting-Examples</category> <attributes> <package>SeasideTesting-Examples</package> </attributes> </class> <class> <name>SCFrameworkTests</name> <environment>Seaside</environment> <super>XProgramming.SUnit.TestCase</super> <private>false</private> none <imports></imports> <category>SeasideTesting-Examples</category> <attributes> <package>SeasideTesting-VW</package> </attributes> </class> <class> <name>SCRadioGroup</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none radioButtons selectedButton name <imports></imports> <category>SeasideTesting-Html Entities</category> <attributes> <package>SeasideTesting-Html Entities</package> </attributes> </class> <class> <name>SCTestRunner</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none case result <imports></imports> <category>SeasideTesting-TestRunner</category> <attributes> <package>SeasideTesting-TestRunner</package> </attributes> </class> <class> <name>XMLNode</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none node <imports></imports> <category>Kernel-Objects</category> <attributes> <package>SeasideTesting-VW</package> </attributes> </class> <class> <name>XMLElement</name> <environment>Seaside</environment> <super>Seaside.XMLNode</super> <private>false</private> none <imports></imports> <category>SeasideTesting-VW</category> <attributes> <package>SeasideTesting-VW</package> </attributes> </class> <class> <name>XMLText</name> <environment>Seaside</environment> <super>Seaside.XMLNode</super> <private>false</private> none <imports></imports> <category>SeasideTesting-VW</category> <attributes> <package>SeasideTesting-VW</package> </attributes> </class> <class> <name>XMLDocument</name> <environment>Seaside</environment> <super>Seaside.XMLNode</super> <private>false</private> none <imports></imports> <category>SeasideTesting-VW</category> <attributes> <package>SeasideTesting-VW</package> </attributes> </class> <class> <name>SCTestHistoryRenderLoop</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none page <imports></imports> <category>SeasideTesting-TestRunner</category> <attributes> <package>SeasideTesting-TestRunner</package> </attributes> </class> <class> <name>WACounterTest</name> <environment>Seaside</environment> <super>Seaside.SCComponentTestCase</super> <private>false</private> none <imports></imports> <category>SeasideTesting-Examples</category> <attributes> <package>SeasideTesting-Examples</package> </attributes> </class> <class> <name>SCTestHistoryView</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none history currentLocation <imports></imports> <category>SeasideTesting-TestRunner</category> <attributes> <package>SeasideTesting-TestRunner</package> </attributes> </class> <class> <name>SCTestBuilderSession</name> <environment>Seaside</environment> <super>Seaside.WASession</super> <private>false</private> none testBuilder <imports></imports> <category>SeasideTesting-TestRunner</category> <attributes> <package>SeasideTesting-TestRunner</package> </attributes> </class> <class> <name>SCInputWithLabel</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none value <imports></imports> <category>SeasideTesting-Examples</category> <attributes> <package>SeasideTesting-Examples</package> </attributes> </class> <class> <name>SCSeasideEntity</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none attributes entities <imports></imports> <category>SeasideTesting-Html Entities</category> <attributes> <package>SeasideTesting-Html Entities</package> </attributes> </class> <class> <name>SCSeasideGenericEntity</name> <environment>Seaside</environment> <super>Seaside.SCSeasideEntity</super> <private>false</private> none tag <imports></imports> <category>SeasideTesting-Html Entities</category> <attributes> <package>SeasideTesting-Html Entities</package> </attributes> </class> <class> <name>SCSeasideForm</name> <environment>Seaside</environment> <super>Seaside.SCSeasideEntity</super> <private>false</private> none radioGroups <imports></imports> <category>SeasideTesting-Html Entities</category> <attributes> <package>SeasideTesting-Html Entities</package> </attributes> </class> <class> <name>SCHtmlInputComponent</name> <environment>Seaside</environment> <super>Seaside.SCSeasideEntity</super> <private>false</private> none form value <imports></imports> <category>SeasideTesting-Html Entities</category> <attributes> <package>SeasideTesting-Html Entities</package> </attributes> </class> <class> <name>SCFileHtmlInput</name> <environment>Seaside</environment> <super>Seaside.SCHtmlInputComponent</super> <private>false</private> none <imports></imports> <category>SeasideTesting-Html Entities</category> <attributes> <package>SeasideTesting-Html Entities</package> </attributes> </class> <class> <name>SCSelectOption</name> <environment>Seaside</environment> <super>Seaside.SCSeasideEntity</super> <private>false</private> none label value selectInput <imports></imports> <category>SeasideTesting-Html Entities</category> <attributes> <package>SeasideTesting-Html Entities</package> </attributes> </class> <class> <name>SCSubmitButtonHtmlInput</name> <environment>Seaside</environment> <super>Seaside.SCHtmlInputComponent</super> <private>false</private> none <imports></imports> <category>SeasideTesting-Html Entities</category> <attributes> <package>SeasideTesting-Html Entities</package> </attributes> </class> <class> <name>SCTextHtmlInput</name> <environment>Seaside</environment> <super>Seaside.SCHtmlInputComponent</super> <private>false</private> none <imports></imports> <category>SeasideTesting-Html Entities</category> <attributes> <package>SeasideTesting-Html Entities</package> </attributes> </class> <class> <name>SCTextAreaHtmlInput</name> <environment>Seaside</environment> <super>Seaside.SCTextHtmlInput</super> <private>false</private> none <imports></imports> <category>SeasideTesting-Html Entities</category> <attributes> <package>SeasideTesting-Html Entities</package> </attributes> </class> <class> <name>SCHiddenHtmlInput</name> <environment>Seaside</environment> <super>Seaside.SCHtmlInputComponent</super> <private>false</private> none <imports></imports> <category>SeasideTesting-Html Entities</category> <attributes> <package>SeasideTesting-Html Entities</package> </attributes> </class> <class> <name>SCSeasideStateMarker</name> <environment>Seaside</environment> <super>Seaside.SCSeasideEntity</super> <private>false</private> none sessionId continuationId <imports></imports> <category>SeasideTesting-Html Entities</category> <attributes> <package>SeasideTesting-Html Entities</package> </attributes> </class> <class> <name>SCSeasideAnchor</name> <environment>Seaside</environment> <super>Seaside.SCSeasideStateMarker</super> <private>false</private> none fullUrl anchorNumber path <imports></imports> <category>SeasideTesting-Html Entities</category> <attributes> <package>SeasideTesting-Html Entities</package> </attributes> </class> <class> <name>SCSelectHtmlInput</name> <environment>Seaside</environment> <super>Seaside.SCHtmlInputComponent</super> <private>false</private> none selectedOptions <imports></imports> <category>SeasideTesting-Html Entities</category> <attributes> <package>SeasideTesting-Html Entities</package> </attributes> </class> <class> <name>SCSeasideTextEntity</name> <environment>Seaside</environment> <super>Seaside.SCSeasideEntity</super> <private>false</private> none text <imports></imports> <category>SeasideTesting-Html Entities</category> <attributes> <package>SeasideTesting-Html Entities</package> </attributes> </class> <comment> Seaside.SCSeasideTextEntity
Not a real XHTML element...just a place to hold CDATA.
</comment> <class> <name>SCCheckboxHtmlInput</name> <environment>Seaside</environment> <super>Seaside.SCHtmlInputComponent</super> <private>false</private> none <imports></imports> <category>SeasideTesting-Html Entities</category> <attributes> <package>SeasideTesting-Html Entities</package> </attributes> </class> <class> <name>SCSeasideResponse</name> <environment>Seaside</environment> <super>Seaside.SCSeasideEntity</super> <private>false</private> none httpResponse <imports></imports> <category>SeasideTesting-Html Entities</category> <attributes> <package>SeasideTesting-Html Entities</package> </attributes> </class> <class> <name>SCRadioButtonHtmlInput</name> <environment>Seaside</environment> <super>Seaside.SCHtmlInputComponent</super> <private>false</private> none group internalValue <imports></imports> <category>SeasideTesting-Html Entities</category> <attributes> <package>SeasideTesting-Html Entities</package> </attributes> </class> <class> <name>SCTestingPseudomain</name> <environment>Seaside</environment> <super>Seaside.WARenderLoopMain</super> <private>false</private> none renderLoop storedSession <imports></imports> <category>SeasideTesting-Core</category> <attributes> <package>SeasideTesting-Core</package> </attributes> </class> <class> <name>SCFileDownloadComponent</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none <imports></imports> <category>SeasideTesting-Examples</category> <attributes> <package>SeasideTesting-Examples</package> </attributes> </class> <comment> Seaside.SCFileDownloadComponent
Seaside tutorial http://www.shaffer-consulting.com/david/Seaside/RenderingBasics/index.html testing various components
</comment> <class> <name>SCExceptionDuringRendering</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none <imports></imports> <category>SeasideTesting-Examples</category> <attributes> <package>SeasideTesting-Examples</package> </attributes> </class> <class> <name>SCTestErrorHandler</name> <environment>Seaside</environment> <super>Seaside.WAWalkbackErrorHandler</super> <private>false</private> none case <imports></imports> <category>SeasideTesting-Core</category> <attributes> <package>SeasideTesting-Core</package> </attributes> </class> <class> <name>SCTestException</name> <environment>Seaside</environment> <super>Core.Error</super> <private>false</private> none <imports></imports> <category>SeasideTesting-Examples</category> <attributes> <package>SeasideTesting-Examples</package> </attributes> </class> <class> <name>HttpHeader</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none header <imports></imports> <category>SeasideTesting-VW</category> <attributes> <package>SeasideTesting-VW</package> </attributes> </class> <class> <name>SCTestBuilder</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none component requests <imports></imports> <category>SeasideTesting-TestRunner</category> <attributes> <package>SeasideTesting-TestRunner</package> </attributes> </class> <class> <name>SCCanvasComponentTest</name> <environment>Seaside</environment> <super>Seaside.SCComponentTestCase</super> <private>false</private> none <imports></imports> <category>SeasideTesting-Examples</category> <attributes> <package>SeasideTesting-Examples</package> </attributes> </class> <class> <name>SCTestComponent6</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none selectedItem <imports></imports> <category>SeasideTesting-Examples</category> <attributes> <package>SeasideTesting-Examples</package> </attributes> </class> <class> <name>DTDEntityDeclaration</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none name value <imports></imports> <category>SeasideTesting-VW</category> <attributes> <package>SeasideTesting-VW</package> </attributes> </class> <class> <name>SCTestComponent2</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none firstSent secondSent <imports></imports> <category>SeasideTesting-Examples</category> <attributes> <package>SeasideTesting-Examples</package> </attributes> </class> <methods> Seaside.SCTestComponent7 <category>rendering</category>
renderContentOn: html html form with: [html submitButton callback: [self answer: true]]
</methods> <methods> Seaside.SCTestCaseMain <category>accessing</category>
start: aRequest | root | root := self createRoot. (aRequest fields includesKey: 'filter') ifTrue: [root filterString: (aRequest fields at: 'filter')]. (WARenderLoop new root: root) run
</methods> <methods> Seaside.SCTestComponent4 <category>accessing</category>
firstSent ^firstSent
renderContentOn: html self firstSent ifFalse: [html anchor callback: [self sendFirst]; with: 'first link']. html text: 'hello'. self secondSent ifFalse: [ html anchor id: 'second'; callback: [self sendSecond]; with: 'second link']. self thirdSent ifFalse: [ html anchor id: 'third'; callback: [self sendThird]; with: 'third link']
secondSent ^secondSent
thirdSent ^thirdSent
</methods> <methods> Seaside.SCTestComponent4 <category>initialization</category>
initialize super initialize. self session registerObjectForBacktracking: self. firstSent := false. secondSent := false. thirdSent := false
</methods> <methods> Seaside.SCTestComponent4 <category>callbacks</category>
sendFirst firstSent := true
sendSecond secondSent := true
sendThird thirdSent := true. self answer: 1234
</methods> <methods> Seaside.SCTestComponent4 class <category>seaside</category>
canBeRoot ^true
</methods> <methods> Seaside.SCTesterApplication <category>request handling</category>
createSession | session | session := self sessionClass new setParent: self. testCase sessionCreated: session. ^session
handleDefaultRequest: aRequest | session | session := self createSession. ^session handleRequest: aRequest
</methods> <methods> Seaside.SCTesterApplication <category>accessing</category>
handlerWithKey: aKey ^handlersByKey at: aKey ifAbsent: []
testCase ^testCase
testCase: anObject testCase := anObject
</methods> <methods> Seaside.SCTesterApplication class <category>testing</category>
isAbstract ^true
</methods> <methods> Seaside.SCTesterApplication class <category>accessing</category>
path: aString ^self named: aString
</methods> <methods> Seaside.SCRunnerTask <category>accessing</category>
answerChecker ^checker
component ^component
componentClass ^componentClass
componentClass: anObject componentClass := anObject
createComponentBlock ^createComponentBlock
createComponentBlock: anObject createComponentBlock := anObject
description "Polymorphism with WAComponent class method" ^self componentClass description
initializationBlock ^initializationBlock
initializationBlock: anObject initializationBlock := anObject
</methods> <methods> Seaside.SCRunnerTask <category>rendering</category>
createComponent component := createComponentBlock ifNil: [componentClass new] ifNotNil: [createComponentBlock value]. checker := SCAnswerChecker new. initializationBlock ifNotNil: [initializationBlock value: component]. component addDecoration: checker. ^ component
go self createComponent. self call: component. self inform: 'Component answered'
</methods> <methods> Seaside.SCRunnerTask <category>initialization</category>
initializeDecoration "We don't have a session when constructed so we can't do this"
</methods> <methods> Seaside.SCRunnerTask <category>hacks</category>
hasTestSuite ^false
new "We pretend like we're a class...sorry" ^self
</methods> <methods> Seaside.SCAnswerChecker <category>call/answer</category>
handleAnswer: anObject (super handleAnswer: anObject) ifFalse: [hasAnswer := true. answerValue := anObject] ifTrue: [^true]. ^ false
</methods> <methods> Seaside.SCAnswerChecker <category>accessing</category>
answerValue ^answerValue
hasAnswer ^ hasAnswer ifNil: [hasAnswer := false]
</methods> <methods> Seaside.SCTestHistoryContentView <category>accessing</category>
page ^page
page: anObject page := anObject
</methods> <methods> Seaside.SCComponentTestCase <category>private</category>
checkResponseForDebugging: response | a finalResponse | finalResponse := response. self isDebugging ifTrue: [a := response anchorWithLabel: 'Debug' ifNone: [^finalResponse]. [finalResponse := self followAnchor: a] fork. self halt: 'Browser waiting for response, proceed when you''re done debugging.']. ^ finalResponse
errorOccurred: e self isDebugging ifFalse: [self error: 'An error occured during request processing']
</methods> <methods> Seaside.SCComponentTestCase <category>dispatcher</category>
applicationPathForClass: aClass ^aClass name, '_' , testSelector asString
dispatcher ^self class dispatcher
</methods> <methods> Seaside.SCComponentTestCase <category>component</category>
component ^runnerTask component
frontMostComponent ^ runnerTask component visiblePresentersDo: [:each | each isDecoration ifFalse: [^each]]
</methods> <methods> Seaside.SCComponentTestCase <category>subclass hooks</category>
configureApplicationForComponent: aComponentClass "This gets sent when SeasideTesting creates the entry point for your test class. Override it to configure your application's session class or other 'preferences' but be sure to do the super send. " app preferenceAt: #deploymentMode put: true. pseudomain := SCTestingPseudomain new. app preferenceAt: #mainClass put: pseudomain. handler := SCTestErrorHandler new. handler case: self. app preferenceAt: #errorHandler put: handler. runnerTask := SCRunnerTask new. runnerTask componentClass: aComponentClass. app preferenceAt: #rootComponent put: runnerTask
sessionCreated: aSession "This is a hook for subclasses that want to perform specific actions in response to session creation (such as initializing a database connection)."
</methods> <methods> Seaside.SCComponentTestCase <category>application</category>
newApplicationWithRootClass: aComponentClass ^self newApplicationWithRootClass: aComponentClass initializeWith: nil
newApplicationWithRootClass: aComponentClass createWith: aBlock app := SCTesterApplication path: (self applicationPathForClass: aComponentClass). app testCase: self. app configuration addAncestor: WARenderLoopConfiguration instance. self dispatcher register: app. self configureApplicationForComponent: aComponentClass. runnerTask createComponentBlock: aBlock. ^ app
newApplicationWithRootClass: aComponentClass initializeWith: aBlock app := SCTesterApplication path: (self applicationPathForClass: aComponentClass). app testCase: self. app configuration addAncestor: WARenderLoopConfiguration instance. self dispatcher register: app. self configureApplicationForComponent: aComponentClass. runnerTask initializationBlock: aBlock. ^ app
responseSemaphore ^ responseSema ifNil: [responseSema := Semaphore new]
</methods> <methods> Seaside.SCComponentTestCase <category>running</category>
debug self resources do: [:res | res isAvailable ifFalse: [^ res signalInitializationError]]. [(self class selector: testSelector) makeDebugging; runCase] ensure: [self resources do: [:each | each reset]]
makeDebugging debugging := true
run: aResult debugging := false. ^super run: aResult
runCaseAsFailure: aSemaphore self makeDebugging. super runCaseAsFailure: aSemaphore
</methods> <methods> Seaside.SCComponentTestCase <category>request/response</category>
back ^self browser back
backAndRefresh self back. ^self refresh
establishSession ^ self checkResponseForDebugging: (self browser establishSessionAtBase: app baseUrl asString)
followAnchor: anAnchor | response | anAnchor basePath: app basePath. response := self browser followAnchor: anAnchor. ^self checkResponseForDebugging: response
lastResponse ^self browser lastResponse
refresh ^self browser refresh
submitForm: form ^self submitForm: form pressingButton: nil
submitForm: form pressingButton: button | response | response := self browser submitForm: form pressingButton: button. ^self checkResponseForDebugging: response
</methods> <methods> Seaside.SCComponentTestCase <category>accessing</category>
browser ^ browser ifNil: [browser := SCBrowserSimulator new responseSemaphore: self responseSemaphore; yourself]
isDebugging ^debugging
session ^ pseudomain storedSession
</methods> <methods> Seaside.SCComponentTestCase <category>answering</category>
answer | checker | checker := runnerTask answerChecker. ^checker hasAnswer ifTrue: [checker answerValue] ifFalse: [self error: 'Component did not answer.']
componentAnswered ^ runnerTask answerChecker hasAnswer
componentAnswered: value | checker | checker := runnerTask answerChecker. ^checker hasAnswer and: [checker answerValue = value]
</methods> <methods> Seaside.SCComponentTestCase class <category>dispatcher</category>
clearEntryPoints "self clearEntryPoints" (WADispatcher default entryPoints includesKey: self entryPointKey) ifTrue: [WADispatcher default register: (WADispatcher named: self entryPointKey)]
dispatcher self ensureEntryPointExists. ^WADispatcher default entryPoints at: self entryPointKey
ensureEntryPointExists (WADispatcher default entryPoints includesKey: self entryPointKey) ifFalse: [WADispatcher default register: (WADispatcher named: self entryPointKey)]
entryPointKey ^'activeTests'
</methods> <methods> Seaside.SCComponentTestCase class <category>Testing</category>
isAbstract "Override to true if a TestCase subclass is Abstract and should not have TestCase instances built from it" ^ self name = #SCComponentTestCase
</methods> <methods> Seaside.SCFormDemoTest <category>Running</category>
testDisplay | form | self newApplicationWithRootClass: SCFormDemo. self establishSession. form := self lastResponse forms first. form textInputWithId: 'name' value: 'Bob Smith'. form textInputWithId: 'age' value: '40'. self submitForm: form pressingButton: form buttons first. self assert: (self lastResponse entitiesNamed: 'h3') first contentString = 'Hello Bob Smith. You are 40 years old.'
</methods> <methods> Seaside.SCSampleComponentTest <category>tests</category>
testAnswer self newApplicationWithRootClass: SCTestComponent4. self establishSession. self followAnchor: (self lastResponse anchorWithLabel: 'third link'). self assert: (self componentAnswered: 1234)
testBack self newApplicationWithRootClass: SCTestComponent4. self establishSession. self followAnchor: (self lastResponse anchorWithLabel: 'first link'). self assert: self component firstSent. self deny: self component secondSent. self followAnchor: (self lastResponse anchorWithLabel: 'second link'). self backAndRefresh. self assert: self component firstSent. self deny: self component secondSent
testComponent1 self newApplicationWithRootClass: SCTestComponent1. self establishSession. self assert: (self lastResponse stringWithId: 'main') = 'hello'
testComponent2 self newApplicationWithRootClass: SCTestComponent2. self establishSession. self followAnchor: (self lastResponse anchorWithId: 'first'). self assert: self component firstSent. self deny: self component secondSent. self followAnchor: (self lastResponse anchorWithLabel: 'second link'). self assert: self component firstSent. self assert: self component secondSent
testComponent3 | form | self newApplicationWithRootClass: SCTestComponent3. self establishSession. form := self lastResponse forms first. form textInputWithId: 'field1' value: 'bob'. form textInputWithId: 'field2' value: 'jane'. self submitForm: form pressingButton: form buttons first. self assert: self component field1 = 'bob'. self assert: self component field2 = 'jane'
testComponent6 | form list | self newApplicationWithRootClass: SCTestComponent6. self establishSession. form := self lastResponse forms first. list := form selectListWithId: 'theList'. list selectOptionWithText: 'b'. self submitForm: form pressingButton: form buttons first. self assert: self component selectedItem = #b
testFrontMost self newApplicationWithRootClass: SCTestComponent5. self establishSession. self assert: (self frontMostComponent isKindOf: SCTestComponent5). self followAnchor: self lastResponse anchors first. self assert: (self frontMostComponent isKindOf: SCTestComponent4). self followAnchor: (self lastResponse anchorWithLabel: 'third link'). self assert: (self frontMostComponent isKindOf: SCTestComponent5)
testFrontMostIsDialog self newApplicationWithRootClass: SCTestComponent5. self establishSession. self followAnchor: (self lastResponse anchors second). self assert: (self frontMostComponent isKindOf: WAFormDialog)
</methods> <methods> Seaside.WAAllTestsTest <category>tests</category>
htmlTestClass "WAOldApiHtmlTest = Seaside 2.7 WAHtmlTest = Seaside 2.6" ^WAOldApiHtmlTest ifNil: [WAHtmlTest].
inputTestClass "WAOldApiInputTest = Seaside 2.7 WAInputTest = Seaside 2.6" ^WAOldApiInputTest ifNil: [WAInputTest].
selectedComponent ^self component contents selectedComponent
testButtons | form | self newApplicationWithRootClass: self htmlTestClass. self establishSession. form := self lastResponse formWithId: 'button-form'. self submitForm: form pressingButton: (form buttonWithValue: '5'). self assert: self component number = 5. form := self lastResponse formWithId: 'button-form'. self submitForm: form pressingButton: (form buttonWithValue: '1'). self assert: self component number = 1
testCheckbox | form | self newApplicationWithRootClass: self htmlTestClass. self establishSession. form := self lastResponse formWithId: 'checkbox-form'. (form checkboxWithId: 'cb-a') check. self submitForm: form pressingButton: form buttons first. self assert: self component booleanList first value. form := self lastResponse formWithId: 'checkbox-form'. (form checkboxWithId: 'cb-a') uncheck. self submitForm: form pressingButton: form buttons first. self deny: self component booleanList first value
testException | form | self newApplicationWithRootClass: WAExceptionTest. form := self establishSession forms first. self submitForm: form pressingButton: (form buttonWithValue: 'Yes'). self assert: (self lastResponse containsString: 'Caught:')
testNavigation | form | self newApplicationWithRootClass: WAAllTests. self establishSession. self followAnchor: (self lastResponse anchorWithLabel: 'Input'). self assert: self selectedComponent class = self inputTestClass. self assert: self selectedComponent integer = 42. form := self lastResponse forms first. form textInputWithId: 'nilString' value: 'bob'. self submitForm: form pressingButton: form buttons first. self assert: self selectedComponent nilString = 'bob'. self followAnchor: (self lastResponse anchorWithLabel: 'Html'). self assert: self selectedComponent class = self htmlTestClass. form := self lastResponse formWithId: 'radio-form'. form activateRadioButtonWithId: 'a-on'. self submitForm: form pressingButton: form buttons first. self assert: self selectedComponent booleanList first value. form := self lastResponse formWithId: 'radio-form'. form activateRadioButtonWithId: 'a-off'. self submitForm: form pressingButton: form buttons first. self deny: self selectedComponent booleanList first value. self followAnchor: (self lastResponse anchorWithLabel: 'Parent'). self assert: self selectedComponent class = WAParentTest. self followAnchor: (self lastResponse anchorWithLabel: 'swap parent'). self assert: (self lastResponse containsString: 'foo'). self assert: (self lastResponse anchorWithLabel: 'Html') isNil. form := self lastResponse forms first. self submitForm: form pressingButton: (form buttonWithValue: 'Ok'). self assert: (self lastResponse anchorWithLabel: 'Html') notNil
testSelect | form | self newApplicationWithRootClass: self htmlTestClass. self establishSession. form := self lastResponse formWithId: 'select-form'. (form selectListWithId: 'select-list') selectOptionWithText: '7'. self submitForm: form pressingButton: form buttons first. self assert: self component number = 7. form := self lastResponse formWithId: 'select-form'. self should: [(form selectListWithId: 'select-list') selectOptionWithText: '15'] raise: Error. (form selectListWithId: 'select-list') value: '2'. self submitForm: form pressingButton: form buttons first. self assert: self component number = 2. self should: [form buttonWithValue: '22'] raise: Error.
testTextAreaInput | form | self newApplicationWithRootClass: self htmlTestClass. self establishSession. form := self lastResponse formWithId: 'textarea-form'. self assert: (form entityWithId: 'textarea-banner' containsText: 'Hello world!'). self assert: self component message = 'Hello world!'. form textInputWithId: 'textarea-message' value: 'bob'. self submitForm: form pressingButton: form buttons first. form := self lastResponse formWithId: 'textarea-form'. self assert: (form entityWithId: 'textarea-banner' containsText: 'bob'). self assert: self component message = 'bob'
testTextInput | form | self newApplicationWithRootClass: self htmlTestClass. self establishSession. form := self lastResponse formWithId: 'textInput-form'. self assert: (form entityWithId: 'textInput-banner' containsText: 'Hello world!'). self assert: self component message = 'Hello world!'. form textInputWithId: 'text-message' value: 'bob'. self submitForm: form pressingButton: form buttons first. form := self lastResponse formWithId: 'textInput-form'. self assert: (form entityWithId: 'textInput-banner' containsText: 'bob'). self assert: self component message = 'bob'
</methods> <methods> Seaside.WAMiniCalendarTest <category>Running</category>
testSelectedDate | selected anchors | self newApplicationWithRootClass: WAMiniCalendar initializeWith: [:cal | cal canSelectBlock: [:date | true]. cal selectBlock: [:date | selected := date]]. self establishSession. self assert: selected isNil. anchors := self lastResponse anchorsWithLabel: (Date today dayOfMonth printString). self followAnchor: anchors last. self assert: selected = Date today.
</methods> <methods> Seaside.SCFormDemo <category>accessing</category>
age ^age
age: anObject age := anObject
name ^name
name: anObject name := anObject
</methods> <methods> Seaside.SCFormDemo <category>rendering</category>
displayInfo self inform: 'Hello ' , name , '. You are ' , age , ' years old.'
renderContentOn: html html form with: [ html text: 'Name: '. html textInput id: 'name'; on: #name of: self. html break. html text: 'Age: '. html textInput id: 'age'; on: #age of: self. html break. html submitButton callback: [self displayInfo]; value: 'Display']
</methods> <methods> Seaside.SCFormDemo class <category>seaside</category>
canBeRoot ^true
</methods> <methods> Seaside.SCDoNothingTaskTest <category>running</category>
testNotInfiniteLoop "Make sure that tasks which don't call anything don't cause an infinite loop" self newApplicationWithRootClass: SCDoNothingTask.
</methods> <methods> Seaside.SCSetBacktrackingComponent <category>rendering</category>
renderContentOn: html html form: [html textInput id: 'input'; callback: [:v | value := v]. html submitButton callback: [set add: value]; value: 'add'. html submitButton callback: [set remove: value]; value: 'remove']
</methods> <methods> Seaside.SCSetBacktrackingComponent <category>initialization</category>
initialize super initialize. self session registerObjectForBacktracking: (set := Set new).
</methods> <methods> Seaside.SCSetBacktrackingComponent <category>accessing</category>
set ^set
</methods> <methods> Seaside.SCTestComponent3 <category>accessing</category>
button1WasPressed ^button1WasPressed
button2WasPressed ^ button2WasPressed
field1 ^field1
field1: anObject field1 := anObject
field2 ^field2
field2: anObject field2 := anObject
</methods> <methods> Seaside.SCTestComponent3 <category>callbacks</category>
button1Pressed button1WasPressed := true
button2Pressed button2WasPressed := true
</methods> <methods> Seaside.SCTestComponent3 <category>rendering</category>
renderContentOn: html html form with: [html text: 'field1: '. html textInput id: 'field1'; on: #field1 of: self. html break. html text: 'field2: '. html textInput id: 'field2'; on: #field2 of: self. html break. html submitButton id: 'button1'; callback: [self button1Pressed]; value: 'button1'. html submitButton id: 'button2'; callback: [self button2Pressed]; value: 'button2']
</methods> <methods> Seaside.SCExceptionDuringRenderingTest <category>as yet unclassified</category>
couldBeTestException self newApplicationWithRootClass: SCExceptionDuringRendering. self should: [self establishSession] raise: SCTestException
</methods> <methods> Seaside.SCTestRunnerFiles <category>uploaded</category>
haloTestGif | xxxCache | xxxCache := #(nil ) beMutable. (xxxCache at: 1) isNil ifTrue: [xxxCache at: 1 put: #(71 73 70 56 57 97 16 0 16 0 240 0 49 63 63 63 212 212 212 33 249 4 1 0 0 1 0 44 0 0 0 0 16 0 16 0 0 2 37 140 143 169 203 224 239 154 2 108 81 4 115 160 113 215 11 26 23 38 150 94 18 158 227 36 114 91 246 160 21 43 91 240 58 231 121 1 0 59 ) asByteArray]. ^ xxxCache at: 1
</methods> <methods> Seaside.SCDoNothingTask <category>rendering</category>
go ^self
</methods> <methods> Seaside.SCInputWithLabelTest <category>running</category>
testFindInput | labels form inputs | self newApplicationWithRootClass: SCInputWithLabel. self establishSession. form := self lastResponse forms first. labels := form labelsWithText: 'some text'. self assert: labels size = 1. inputs := form inputsWithLabel: 'some text'. self assert: inputs size = 1. inputs first value: 'type something'. self submitForm: form pressingButton: form buttons first. self assert: self component value = 'type something'
</methods> <methods> SAXHandler <category>entities</category>
addEntityNamed: entityName value: entityValue self dtd generalEntityAt: entityName put: ((XML.GeneralEntity new) name: entityName; text: entityValue) from: self
</methods> <methods> SAXHandler <category>content</category>
endElement: tag self subclassResponsibility
endElement: namespaceURI localName: localName qName: name self endElement: localName
startElement: tag attributeList: attributeList self subclassResponsibility
startElement: namespaceURI localName: localName qName: name attributes: attributes ^ self startElement: localName attributeList: (self dictionaryFromAttributeList: attributes)
</methods> <methods> SAXHandler <category>accessing</category>
document ^document
document: anObject document := anObject
driver ^driver
driver: anObject driver := anObject
</methods> <methods> SAXHandler <category>utility</category>
dictionaryFromAttributeList: aList "Take a collection of XML.Attribute instances and transform it into a dictionary" | d | d := Dictionary new. aList do: [:attribute | d at: attribute key type put: attribute value]. ^d
</methods> <methods> SAXHandler class <category>instance creation</category>
on: aStream | driver parser | driver := XML.XMLParser on: aStream. driver validate: true. parser := self new driver: driver. ^ parser
</methods> <methods> Seaside.SCSeasideResponseParser <category>content</category>
characters: aString self top addEntity: (SCSeasideTextEntity on: aString)
endElement: elementName elementName asUppercase = 'FORM' ifTrue: [currentForm := nil]. elementName asUppercase = 'SELECT' ifTrue: [currentSelect := nil]. ^self pop
ignorableWhitespace: aString self characters: aString first asString
inputComponentFor: attributes | type | type := (attributes at: 'type' ifAbsent: ['']) asLowercase. type = 'text' | (type = 'password') ifTrue: [^ SCTextHtmlInput attributes: attributes form: currentForm]. type = 'checkbox' ifTrue: [^ SCCheckboxHtmlInput attributes: attributes form: currentForm]. type = 'hidden' ifTrue: [^ SCHiddenHtmlInput attributes: attributes form: currentForm]. type = 'submit' ifTrue: [^ SCSubmitButtonHtmlInput attributes: attributes form: currentForm]. type = 'radio' ifTrue: [^ self radioComponentFor: attributes]. type = 'reset' ifTrue: [^ nil]. type = 'file' ifTrue: [^ SCFileHtmlInput attributes: attributes form: currentForm]. self error: 'unknown input type'
radioComponentFor: attributes | group button | group := currentForm getOrCreateRadioGroup: (attributes at: 'name' ifAbsent: []). button := SCRadioButtonHtmlInput group: group attributes: attributes form: currentForm. group addButton: button. ^ button
startAnchor: attributes | anchor | anchor := SCSeasideAnchor withAttributes: attributes. self addEntity: anchor
startDocument self push: self document
startElement: elementName attributeList: attributeList | tag | tag := elementName asUppercase. tag = 'A' ifTrue: [^self startAnchor: attributeList]. tag = 'FORM' ifTrue: [^self startForm: attributeList]. tag = 'INPUT' ifTrue: [^self startInput: attributeList]. tag = 'BUTTON' ifTrue: [^self startInput: attributeList]. tag = 'SELECT' ifTrue: [^self startSelect: attributeList]. tag = 'TEXTAREA' ifTrue: [^self startTextArea: attributeList]. tag = 'OPTION' ifTrue: [^self startOption: attributeList]. ^self startGenericElement: elementName attributeList: attributeList
startElement: localName namespaceURI: namespaceUri namespace: namespace attributeList: attributeList ^ self startElement: localName attributeList: attributeList
startForm: attributes | form | form := SCSeasideForm withAttributes: attributes. self addEntity: form. currentForm := form
startGenericElement: elementName attributeList: attributeList | entity | entity := SCSeasideGenericEntity new tag: elementName; attributes: attributeList. self addEntity: entity
startInput: attributes self addEntity: (self inputComponentFor: attributes)
startOption: attributes self addEntity: (SCSelectOption select: currentSelect attributes: attributes)
startSelect: attributes self addEntity: (currentSelect := SCSelectHtmlInput attributes: attributes form: currentForm).
startTextArea: attributes self addEntity: (SCTextAreaHtmlInput attributes: attributes form: currentForm).
</methods> <methods> Seaside.SCSeasideResponseParser <category>stack</category>
addEntity: entity self stack notEmpty ifTrue: [self top addEntity: entity]. self push: entity
pop ^self stack removeLast
push: anObject self stack add: anObject
stack ^stack ifNil: [stack := OrderedCollection new]
top ^self stack last
</methods> <methods> Seaside.SCSeasideResponseParser <category>accessing</category>
response ^response
response: anObject response := anObject
</methods> <methods> Seaside.SCSeasideResponseParser class <category>parsing</category>
parseDocumentFrom: aStream ^SeasidePlatformSupport parseSeasideDocumentFrom: aStream
parseDocumentFromResponse: aResponse ^((aResponse contentType beginsWith: 'text/html') or: [aResponse contentType beginsWith: 'text/xhtml']) ifTrue: [ (self parseDocumentFrom: aResponse contents) httpResponse: aResponse; yourself] ifFalse: [SCSeasideResponse new httpResponse: aResponse; yourself]
</methods> <methods> Seaside.SCSeasideResponseParser class <category>private</category>
addEntitiesTo: aDict aDict at: 'nbsp' put: (DTDEntityDeclaration name: 'nbsp' value: Character space)
</methods> <methods> Seaside.WAYesOrNoDialogTest <category>tests</category>
testNo | form | self newApplicationWithRootClass: WAYesOrNoDialog. form := self establishSession forms first. self submitForm: form pressingButton: (form buttonWithValue: 'No'). self assert: (self componentAnswered: false)
testYes | form | self newApplicationWithRootClass: WAYesOrNoDialog. form := self establishSession forms first. self submitForm: form pressingButton: (form buttonWithValue: 'Yes'). self assert: self answer = true
</methods> <methods> Seaside.HttpResponse <category>attributes</category>
contents "Answers a stream, make sure it is positioned at the beginning" ^self response body source reset
contentType ^self response contentType
cookies | setCookie | setCookie := self response setCookie value. setCookie isNil ifTrue: [^ OrderedCollection new]. ^ setCookie collect: [:each | each name , '=' , each value value].
fields ^HttpHeader new header: self response header.
status self response isMoved ifTrue: [^#tempMoved]. ^ #ok
</methods> <methods> Seaside.HttpResponse <category>accessing</category>
response ^response
response: anObject response := anObject
</methods> <methods> Seaside.SCSetBacktrackingTest <category>tests</category>
testAdd | form input | self newApplicationWithRootClass: SCSetBacktrackingComponent. self establishSession. form := self lastResponse forms first. input := form textInputWithId: 'input'. input value: 'entry1'. self submitForm: form pressingButton: (form buttonWithValue: 'add'). self assert: (self component set includes: 'entry1')
testRemove | form input | self newApplicationWithRootClass: SCSetBacktrackingComponent. self establishSession. form := self lastResponse forms first. input := form textInputWithId: 'input'. input value: 'entry1'. self submitForm: form pressingButton: (form buttonWithValue: 'add'). self assert: (self component set includes: 'entry1'). form := self lastResponse forms first. input := form textInputWithId: 'input'. input value: 'entry1'. self submitForm: form pressingButton: (form buttonWithValue: 'remove'). self deny: (self component set includes: 'entry1').
testSequence1 | form input | self newApplicationWithRootClass: SCSetBacktrackingComponent. self establishSession. form := self lastResponse forms first. input := form textInputWithId: 'input'. input value: 'entry1'. self submitForm: form pressingButton: (form buttonWithValue: 'add'). form := self lastResponse forms first. input := form textInputWithId: 'input'. input value: 'entry2'. self submitForm: form pressingButton: (form buttonWithValue: 'add'). form := self lastResponse forms first. input := form textInputWithId: 'input'. input value: 'entry3'. self submitForm: form pressingButton: (form buttonWithValue: 'add'). self assert: (self component set includesAllOf: (Array with: 'entry1' with: 'entry2' with: 'entry3')). form := self lastResponse forms first. input := form textInputWithId: 'input'. input value: 'entry1'. self submitForm: form pressingButton: (form buttonWithValue: 'remove'). self deny: (self component set includes: 'entry1'). self back. self backAndRefresh. self assert: (self component set includes: 'entry1'). form := self lastResponse forms first. input := form textInputWithId: 'input'. input value: 'entry1'. self submitForm: form pressingButton: (form buttonWithValue: 'remove'). self deny: (self component set includes: 'entry1').
testSequence2 | form input | self newApplicationWithRootClass: SCSetBacktrackingComponent. self establishSession. form := self lastResponse forms first. input := form textInputWithId: 'input'. input value: 'entry1'. self submitForm: form pressingButton: (form buttonWithValue: 'add'). form := self lastResponse forms first. input := form textInputWithId: 'input'. input value: 'entry2'. self submitForm: form pressingButton: (form buttonWithValue: 'add'). form := self lastResponse forms first. input := form textInputWithId: 'input'. input value: 'entry3'. self submitForm: form pressingButton: (form buttonWithValue: 'add'). self assert: (self component set includesAllOf: (Array with: 'entry1' with: 'entry2' with: 'entry3')). form := self lastResponse forms first. input := form textInputWithId: 'input'. input value: 'entry1'. self submitForm: form pressingButton: (form buttonWithValue: 'remove'). self deny: (self component set includes: 'entry1'). self back. self backAndRefresh. self assert: (self component set includes: 'entry1'). form := self lastResponse forms first. input := form textInputWithId: 'input'. input value: 'entry1'. self submitForm: form pressingButton: (form buttonWithValue: 'remove'). self deny: (self component set includes: 'entry1'). self backAndRefresh. self assert: (self component set includes: 'entry1')
</methods> <methods> Seaside.SCTestCaseViewer <category>accessing</category>
filterString ^(filterString isNil or: [filterString isEmpty]) ifTrue: ['*'] ifFalse: [filterString]
filterString: anObject filterString := anObject
sortedCategories | sc | sc := SortedCollection new. self testCasesByCategory keys do: [:cat | sc add: cat]. ^sc
testCases ^Preferences testRunnerShowAbstractClasses ifTrue: [SCComponentTestCase allSubclasses] ifFalse: [SCComponentTestCase allSubclasses reject: [:cls | cls isAbstract]]
testCasesByCategory | d | d := Dictionary new. self testCases do: [:case | (d at: case category ifAbsentPut: [OrderedCollection new]) add: case]. ^d
</methods> <methods> Seaside.SCTestCaseViewer <category>rendering</category>
renderCase: case on: html ^html listItem with: [html anchor callback: [self runCase: case]; with: case name]
renderContentOn: html | d | self renderFilterFormOn: html. d := self testCasesByCategory. (self sortedCategories select: [:category | self filterString match: category]) do: [:category | html heading level: 2; with: [html anchor callback: [self runCategory: category]; with: category]. html orderedList with: [((d at: category) asSortedCollection: [:x :y | x name <= y name]) do: [:case | self renderCase: case on: html]]]
renderFilterFormOn: html html form with: [html textInput on: #filterString of: self. html submitButton callback: []; value: 'Filter']
</methods> <methods> Seaside.SCTestCaseViewer <category>callbacks</category>
runCase: caseClass self call: (SCTestRunner forCase: caseClass suite)
runCategory: categoryString | testClasses suite | testClasses := self testCasesByCategory at: categoryString. suite := SeasidePlatformSupport testSuiteClass new. testClasses do: [:each | suite addTest: each suite]. self call: (SCTestRunner forCase: suite)
</methods> <methods> Seaside.SCTestCaseViewer class <category>class initialization</category>
initialize "self initialize" | app | super initialize. app := self registerAsApplication: 'testRunner'. app preferenceAt: #mainClass put: SCTestCaseMain. app preferenceAt: #sessionExpirySeconds put: 6000
</methods> <methods> Seaside.SCRenderLoop <category>accessing</category>
root ^root
</methods> <methods> Seaside.SCBrowserSimulator <category>private</category>
cookieString | out | self cookies isEmpty ifTrue: [^ '']. out := WriteStream on: String new. out nextPutAll: 'Cookie:'. self cookies values do: [:cookie | out nextPutAll: ' ' , cookie key , '=' , cookie value] separatedBy: [out nextPut: $;]. out nextPutAll: String crlf. ^ out contents
httpGetRequestStreamFor: url ^ ('GET ' , url , ' HTTP/1.0' , String crlf , self cookieString , String crlf) readStream
httpPostRequestStreamForUrl: url data: postData ^ ('POST ' , url , ' HTTP/1.0 ' , String crlf , 'Content-Length: ' , postData size printString , String crlf , 'Content-type: application/x-www-form-urlencoded' , String crlf , self cookieString , String crlf , postData) readStream
parseCookieString: s | parts keyAndValue result | parts := s findTokens: ';'. keyAndValue := parts first findTokens: '='. result := WACookie key: keyAndValue first value: keyAndValue second. ^result
privateIssueRequest: anHttpRequest | response cookie | response := SeasidePlatformSupport issueRequest: anHttpRequest responseSemaphore: responseSema. response ifNil: [^ self error: 'What do I do here?']. response cookies ifNotNilDo: [:col | col do: [:cookieString | cookie := self parseCookieString: cookieString. self cookies at: cookie key put: cookie]]. ^ response
</methods> <methods> Seaside.SCBrowserSimulator <category>accessing</category>
cookies ^ cookies ifNil: [cookies := Dictionary new]
history ^history ifNil: [history := OrderedCollection new]
responseSemaphore: s responseSema := s
</methods> <methods> Seaside.SCBrowserSimulator <category>request/response</category>
back self history removeLast. ^ self history last value
establishSessionAtBase: baseUrlString | req | req := HttpRequest readFromStream: (self httpGetRequestStreamFor: baseUrlString). baseUrl := baseUrlString. ^ self issueRequestUntilNotMoved: req
followAnchor: anAnchor | req | anAnchor ifNil: [self error: 'Anchor cannot be nil']. req := HttpRequest readFromStream: (self httpGetRequestStreamFor: (self urlForAnchor: anAnchor)). ^ self issueRequestUntilNotMoved: req
issueRequestUntilNotMoved: anHttpRequest | response req newUrl doc | req := anHttpRequest. [response := self privateIssueRequest: req. response status = #tempMoved] whileTrue: [newUrl := response fields at: 'Location'. req := HttpRequest readFromStream: (self httpGetRequestStreamFor: newUrl)]. doc := SCSeasideResponseParser parseDocumentFromResponse: response. self history add: req -> doc. ^ doc
lastResponse ^self history last value
refresh ^ self issueRequestUntilNotMoved: self history last key
submitForm: form pressingButton: button | req url | form isNil ifTrue: [self error: 'form should be nil']. url := self urlForForm: form. url ifNil: [url := self history last key url]. req := HttpRequest readFromStream: (self httpPostRequestStreamForUrl: url data: (form httpDataWithButton: button)). ^ self issueRequestUntilNotMoved: req
urlForAnchor: anAnchor ^ ((anAnchor asString beginsWith: 'http:') or: [anAnchor asString notEmpty and: [anAnchor asString first = $/]]) ifTrue: [anAnchor asString] ifFalse: [baseUrl , anAnchor asString]
urlForForm: form ^ ((form actionUrl beginsWith: 'http:') or: [form actionUrl notEmpty and: [form actionUrl first = $/]]) ifTrue: [form actionUrl] ifFalse: [baseUrl , form actionUrl asString]
</methods> <methods> Seaside.SCExceptionDuringCallbackTest <category>as yet unclassified</category>
couldBeTestException self newApplicationWithRootClass: SCExceptionDuringCallback. self establishSession. self should: [self followAnchor: self lastResponse anchors first] raise: SCTestException
</methods> <methods> Seaside.SCAnchorDemoTest <category>Running</category>
testAnchor self newApplicationWithRootClass: SCAnchorDemo. self establishSession. self followAnchor: (self lastResponse anchorWithId: 'first'). self assert: (self lastResponse entitiesNamed: 'h3') first contentString = 'pressed'
</methods> <methods> Seaside.XMLDOMParser <category>api</category>
scanDocument "Skip over DTD stuff to avoid Internet access" self sourceWrapper stream skipToAll: '<html'. "Hard-coded DTD" self dtd generalEntityAt: 'nbsp' put: (XML.GeneralEntity new name: 'nbsp'; text: ' ') from: self. self validate: false. ^super scanDocument
</methods> <methods> Seaside.XMLDOMParser class <category>instance creation</category>
parseDocumentFrom: aStream ^ (self on: aStream) scanDocument
</methods> <methods> Seaside.SCFileDownloadComponentTest <category>tests</category>
testDownloadFileLink self newApplicationWithRootClass: SCFileDownloadComponent. self establishSession. self followAnchor: (self lastResponse anchorWithLabel: 'Download file'). self assert: self lastResponse contents = 'some text that may be read from somewhere'
</methods> <methods> Seaside.SCExceptionDuringCallback <category>rendering</category>
renderContentOn: html html anchor callback: [SCTestException signal]; with: 'throw exception'
</methods> <methods> Seaside.SCExceptionDuringCallback class <category>testing</category>
canBeRoot ^true
</methods> <methods> Seaside.SCTestComponent1 <category>rendering</category>
renderContentOn: html html span id: 'main'; with: 'hello'
</methods> <methods> Seaside.SCTestComponent1 class <category>seaside</category>
canBeRoot ^true
</methods> <methods> Seaside.HttpRequest <category>api</category>
execute ^[HttpResponse new response: self request execute] on: Net.HttpException do: [:ex | HttpResponse new response: ex parameter].
</methods> <methods> Seaside.HttpRequest <category>accessing</category>
path "path without the query (ids)" | parts | parts := request requestLine pathString findTokens: '?'. ^parts first
request ^request
request: anObject request := anObject
url ^request requestLine url pathString
</methods> <methods> Seaside.HttpRequest class <category>instance creation</category>
readFromStream: aStream | encodedStream req | encodedStream := (EncodedStream on: aStream contents asByteArray readStream encodedBy: (StreamEncoder new: #ISO8859_1) initializeForMemory) lineEndCRLF. req := Net.HttpRequest readFrom: encodedStream. req host: 'localhost:8008'. ^self new request: req.
</methods> <methods> SeasidePortStrategyTesting class <category>private - import</category>
createBundles | bundle | super createBundles. bundle := Store.BundleModel named: self superBundleName. bundle structure: self superBundleStructure. bundle comment: 'This will be supplied automatically'.
</methods> <methods> SeasidePortStrategyTesting class <category>testing</category>
isBonusPackComponent ^true
isComponent ^true
</methods> <methods> SeasidePortStrategyTesting class <category>constants</category>
bundleComment ^ 'SeasideTesting framework Author : David Schaffer Other contributors : Chad Nantais, Davide Varvello, Roger Whitney Ported from Squeak by : Michel Bany Keywords: Web, Continuations, HTML, XML, SUnit, Testing, Internet, Squeak'
bundleNames ^#( 'SeasideTesting' )
bundleStructure ^#( #(#package 'SeasideTesting-Extensions') #(#package 'SeasideTesting-Core') #(#package 'SeasideTesting-Html Entities') #(#package 'SeasideTesting-Form Components') #(#package 'SeasideTesting-TestRunner') #(#package 'SeasideTesting-Examples') )
bundleTitle ^'SeasideTesting for WebToolkit'
defaultImportFilename ^'SeasideTestingVW5.st'
parcelFolder ^self bonusPackFolder
parcelName ^'SeasideTestingForWebToolKit'
portDocumentation
portSource ^'SeasideTesting-R1.4-mb.18.mcz 28 September 2007 9:02:38 pm'
prerequisites ^#( 'SeasideForWebToolKit' )
publishComment ^'SeasideTesting by C. David Shaffer See http://www.shaffer-consulting.com/david/Seaside/SeasideTesting Ported from '
squeakPackageName ^'SeasideTesting'
superBundleName ^'SeasideTestingBundle'
superBundleStructure ^#( #(#package 'SeasideTesting-VW') #(#bundle 'SeasideTesting') )
</methods> <methods> SeasidePortStrategyTesting class <category>private - deploy</category>
createParcel "Bundle should exist already" | bundle | (bundle := Store.Registry bundleNamed: self superBundleName) isNil ifTrue: [Dialog warn: 'Cannot continue, bundle ' , self superBundleName , ' is missing'. ^false]. bundle leafItems do: [:pkg | pkg overrides do: [:each | each purge]]. bundle developmentPrerequisites: self developmentPrerequisites. bundle deploymentPrerequisites: self deploymentPrerequisites. bundle preLoadBlock: self preLoadBlock. bundle postLoadBlock: self postLoadBlock. bundle comment: self bundle comment. self saveParcelForBundle: bundle
saveParcelForBundle: aBundle self setVersionForBundle: aBundle. aBundle saveAsParcel: self parcelName asFilename saveStructure: false saveLinks: false parcelOptions: Dictionary new.
</methods> <methods> Seaside.SCAnchorDemo <category>rendering</category>
firstPressed self inform: 'pressed'
renderContentOn: html html anchor id: 'first'; callback: [self firstPressed]; with: 'first link'
</methods> <methods> Seaside.SCAnchorDemo class <category>seaside</category>
canBeRoot ^true
</methods> <methods> Seaside.SCTestComponent5 <category>rendering</category>
renderContentOn: html html anchor callback: [self call: SCTestComponent4 new]; with: 'Show SCTestComponent4'. html anchor callback: [self inform: 'this is a dialog']; with: 'dialog'
</methods> <methods> Seaside.SCFrameworkTests <category>resources</category>
fullAnchorText ^'<a href="http://localhost:8010/seaside/go/activeTests/WACounter_testIncrement?_s=FLJdjtybrpYdyPGD&amp;_k=mbpjjYUW&amp;1">++</a>'
relativeAnchorText ^'<a href="?_s=sccQOfGHHdbLNqjR&amp;_k=LuvQNMOV&amp;2">--</a>'
samplePage ^'<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Seaside</title> <meta content="text/html; charset=utf-8" http-equiv="Content-Type"></meta> <link href="/seaside/go/activeTests/WACounter_testIncrement?_s=kdIbWKhslgpPDGFE" rel="stylesheet" type="text/css"></link> <link href="/seaside/go/activeTests/WACounter_testIncrement?_s=bhdpRvpvBeMSUipw" rel="stylesheet" type="text/css"></link> <link href="/seaside/go/activeTests/WACounter_testIncrement?_s=qwjLIXpJIlvClzrt" rel="stylesheet" type="text/css"></link> <script src="/seaside/go/activeTests/WACounter_testIncrement?_s=TPfoYOlawmdPgqSq" type="text/javascript"></script> <script src="/seaside/go/activeTests/WACounter_testIncrement?_s=ARVcRldqzuqoBskg" type="text/javascript"></script> </head> <body onkeydown="onKeyDown(event)" onload="onLoad()"> <img alt="" src="/seaside/go/activeTests/WACounter_testIncrement?_s=fdrwfpgRUkVIYJYp"></img> <h1>0</h1> <a href="http://localhost:8010/seaside/go/activeTests/WACounter_testIncrement?_s=FLJdjtybrpYdyPGD&amp;_k=mbpjjYUW&amp;1">++</a> <a href="?_s=FLJdjtybrpYdyPGD&amp;_k=mbpjjYUW&amp;2">--</a> <form id="the-form" method="post" action=""> <input name="1" value="" type="text" class="text" id="input" /> <input name="2" value="add" type="submit" class="submit" /> <input name="3" value="remove" type="submit" class="submit" /> <div> <input name="_s" value="FLJdjtybrpYdyPGD" type="hidden" class="hidden" /> <input name="_k" value="mbpjjYUW" type="hidden" class="hidden" /> </div> </form> <script type="text/javascript">function onLoad() {}</script> </body> </html>'
</methods> <methods> Seaside.SCFrameworkTests <category>private</category>
anchorFrom: nodeText | response | response := self responseFrom: '<html>' , nodeText , '</html>'. ^response anchors first
fullAnchor ^self anchorFrom: self fullAnchorText.
relativeAnchor ^self anchorFrom: self relativeAnchorText.
responseFrom: someText ^SeasidePlatformSupport parseSeasideDocumentFrom: someText readStream.
</methods> <methods> Seaside.SCFrameworkTests <category>running</category>
testFullAnchor | anchor | anchor := self fullAnchor. self assert: anchor label = '++'; assert: anchor continuationId = 'mbpjjYUW'; assert: anchor sessionId = 'FLJdjtybrpYdyPGD'; assert: anchor asString = 'http://localhost:8010/seaside/go/activeTests/WACounter_testIncrement?_s=FLJdjtybrpYdyPGD&_k=mbpjjYUW&1'; assert: anchor anchorNumber = '1'
testRelativeAnchor | anchor | anchor := self relativeAnchor. self assert: anchor label = '--'; assert: anchor continuationId = 'LuvQNMOV'; assert: anchor sessionId = 'sccQOfGHHdbLNqjR'; assert: anchor anchorNumber = '2'; assert: anchor asString = '?_s=sccQOfGHHdbLNqjR&_k=LuvQNMOV&2'
testSamplePage | resp | resp := self responseFrom: self samplePage. self assert: resp bodyElement tag = 'body'. self assert: resp allEntities size = 53. self assert: resp anchors size = 2. self assert: resp buttons size = 2. self assert: resp forms size = 1. self assert: resp inputs size = 5. self assert: (resp entitiesNamed: 'div') size = 1. self assert: resp bodyElement attributes size = 2. self assert: resp forms first cssId = 'the-form'.
</methods> <methods> Seaside.SCRadioGroup <category>accessing</category>
addButton: aRadioButton self radioButtons add: aRadioButton
name: aString name := aString
radioButtons ^radioButtons ifNil: [radioButtons := OrderedCollection new]
selectRadioButton: aButton self radioButtons do: [:button | button = aButton ifFalse: [button privateMakeUnselected]]. aButton privateMakeSelected
</methods> <methods> Seaside.SCRadioGroup class <category>instance creation</category>
named: aString ^self new name: aString
</methods> <methods> Seaside.SCTestRunner <category>rendering</category>
renderBrowserAnchorFor: aTestCase on: html html popupAnchor callback: [self call: (WABrowser fullOnClass: aTestCase class selector: aTestCase selector)]; extent: 825@560; name: 'browse'; with: 'Browse'
renderContentOn: html html heading level: 2; with: case name. html anchor callback: [self runTests: case]; with: 'Re-run all'. html break. html text: result printString. html horizontalRule. self renderFailedOn: html. self renderErrorOn: html. self renderPassedOn: html. html break. html anchor callback: [self answer]; with: 'close'
renderErrorOn: html html heading level: 3; with: 'Errors:'. result errors do: [:each | html span class: 'error-test'; with: [html text: each printString]. html space. html anchor callback: [each debug]; with: 'Debug'. html space. self renderBrowserAnchorFor: each on: html. html space. self renderHistoryAnchorFor: each on: html. html break]. html horizontalRule
renderFailedOn: html html heading: 'Failed:' level: 3. result failures do: [:each | html span class: 'failed-test'; with: each printString. html space. html anchor callback: [each debugAsFailure]; with: 'Debug'. html space. self renderBrowserAnchorFor: each on: html. html space. self renderHistoryAnchorFor: each on: html. html break]. html horizontalRule
renderHistoryAnchorFor: aCase on: html html anchor callback: [self viewHistoryFor: aCase]; with: 'History'
renderPassedOn: html html heading level: 3; with: 'Passed:'. result passed do: [:each | html span class: 'passed-test'; with: each printString. html space. self renderBrowserAnchorFor: each on: html. html space. self renderHistoryAnchorFor: each on: html. html break]. html horizontalRule
</methods> <methods> Seaside.SCTestRunner <category>initialization</category>
initializeForCase: aTestCase case := aTestCase. self runTests: case
runTests: aTestCase result := aTestCase run
</methods> <methods> Seaside.SCTestRunner <category>actions</category>
viewHistoryFor: aTestCase self call: (SCTestHistoryView forBrowser: aTestCase browser)
</methods> <methods> Seaside.SCTestRunner class <category>class initialization</category>
initialize "self initialize" super initialize. WADispatcherEditor addPlugin: self. WAHalo addPlugin: self
</methods> <methods> Seaside.SCTestRunner class <category>seaside plugin</category>
editorActionsFor: anEntryPoint inEditor: anEditor | rootClass | (anEntryPoint isKindOf: WAApplication) ifFalse: [^#()]. rootClass := anEntryPoint rootComponent. (rootClass isNil or: [rootClass hasTestSuite not]) ifTrue: [^#()]. ^OrderedCollection new add: ((Dictionary new) at: #label put: 'test'; at: #action put: [anEditor call: ((self forCase: rootClass suite) addDecoration: (WAWindowDecoration new title: 'Test runner'); yourself)]; yourself); yourself
haloElementsFor: aTarget inHalo: aHalo aTarget class hasTestSuite ifFalse: [^#()]. ^OrderedCollection new add: ((Dictionary new) at: #image put: SCTestRunnerFiles / #haloTestGif; at: #action put: [self forCase: aTarget class suite]; at: #title put: 'Run test suite'; yourself); yourself
</methods> <methods> Seaside.SCTestRunner class <category>instance creation</category>
forCase: aTestCase ^ self new initializeForCase: aTestCase
</methods> <methods> Seaside.XMLNode <category>accessing</category>
contentString ^node characterData
elementAt: tagType ^ self elements detect: [ :elem | elem name = tagType].
elements self subclassResponsibility
node ^node
node: anObject node := anObject
</methods> <methods> Seaside.XMLNode <category>testing</category>
isText ^ self node isText
</methods> <methods> Seaside.XMLNode class <category>instance creation</category>
fromNode: aNode ^self new node: aNode
</methods> <methods> Seaside.XMLElement <category>accessing</category>
attributeAt: aString ^self attributes at: aString asSymbol ifAbsent: [nil].
attributeAt: aString ifAbsent: aBlock ^self attributes at: aString asSymbol ifAbsent: aBlock
attributes | attributes | attributes := Dictionary new. self node attributes do: [:each | attributes at: each key type asSymbol put: each value]. ^ attributes.
contents ^self elementsAndContents select: [ :each | each isText ].
elements ^self elementsAndContents reject: [ :each | each isText ].
elementsAndContents ^self node elements collect: [:each | each asXMLNode].
name ^self node tag type asSymbol
</methods> <methods> Seaside.XMLElement <category>enumerating</category>
elementsDo: aBlock self elements do: aBlock
</methods> <methods> Seaside.XMLElement <category>printing</category>
printOn: aStream aStream nextPutAll: 'Seaside.XMLElement<' , self name , '>'
</methods> <methods> Seaside.XMLText <category>accessing</category>
elements ^OrderedCollection new.
string ^self node text
</methods> <methods> Seaside.XMLDocument <category>accessing</category>
elements ^ self node elements collect: [:each | each asXMLNode].
</methods> <methods> Seaside.SCTestHistoryRenderLoop <category>accessing</category>
page ^page
page: anObject page := anObject
</methods> <methods> Seaside.SCTestHistoryRenderLoop <category>rendering</category>
render | response | WACurrentSession value respond: [:url | response := WAResponse new. response headerAt: 'Cache-Control' put: 'No-cache'. response stream nextPutAll: page. response]
run [self render] repeat
</methods> <methods> Seaside.WACounterTest <category>tests</category>
testBack self newApplicationWithRootClass: WACounter. self establishSession. self followAnchor: (self lastResponse anchorWithLabel: '++'). self followAnchor: (self lastResponse anchorWithLabel: '++'). self assert: self component count = 2. self back. self followAnchor: (self lastResponse anchorWithLabel: '++'). self assert: self component count = 2
testDecrement self newApplicationWithRootClass: WACounter. self establishSession. self followAnchor: (self lastResponse anchorWithLabel: '--'). self assert: self component count = -1. self followAnchor: (self lastResponse anchorWithLabel: '--'). self assert: self component count = -2
testIncrement self newApplicationWithRootClass: WACounter. self establishSession. self followAnchor: (self lastResponse anchorWithLabel: '++'). self assert: self component count = 1. self followAnchor: (self lastResponse anchorWithLabel: '++'). self assert: self component count = 2
testInitialState self newApplicationWithRootClass: WACounter. self establishSession. self assert: self component count = 0
</methods> <methods> Seaside.SCTestHistoryView <category>initialization</category>
initialize super initialize. currentLocation := 1
</methods> <methods> Seaside.SCTestHistoryView <category>actions</category>
nextPage currentLocation := currentLocation + 1 min: history size
previousPage currentLocation := currentLocation - 1 max: 1
</methods> <methods> Seaside.SCTestHistoryView <category>accessing</category>
history: h history := h. currentLocation := h size
</methods> <methods> Seaside.SCTestHistoryView <category>utilities</category>
onlyBodyOf: aString | rs result | rs := aString readStream. rs upToAll: '<body>'. result := rs upToAll: '</body>'. ^ result
</methods> <methods> Seaside.SCTestHistoryView <category>rendering</category>
renderContentOn: html html heading level: 2; with: 'Test view replay page ' , currentLocation printString , ' of ' , history size printString. html anchor callback: [self answer]; with: 'close'. html space. currentLocation > 1 ifTrue: [html anchor callback: [self previousPage]; with: '<<']. html text: '--'. currentLocation < history size ifTrue: [html anchor callback: [self nextPage]; with: '>>']. html break; horizontalRule. self renderCurrentResponseOn: html.
renderCurrentResponseOn: html | item | currentLocation = 0 ifTrue: [^ nil]. item := history at: currentLocation. html div class: 'contentFrame'; with: [html iframe src: (self urlForAction: [(SCTestHistoryRenderLoop new page: item value fullStringContents) run] on: html)]
renderRequestOn: html "Doesn't currently work. Not called." html heading level: 1; with: 'This page was submitted with: '. html break. html text: (history at: currentLocation) key stream contents
style ^'div.contentFrame {width: 100%; height 500px;} *.contentFrame iframe {width: 100%; height: 500px;}'
urlForAction: aBlock on: html "This is missing from our branch of Seaside" | url | url := html context actionUrl withParameter: (html callbacks registerActionCallback: aBlock). ^url displayString
</methods> <methods> Seaside.SCTestHistoryView class <category>instance creation</category>
forBrowser: aBrowser ^ self new history: aBrowser history
</methods> <methods> Seaside.SCTestBuilderSession <category>accessing</category>
testBuilder ^testBuilder
testBuilder: anObject testBuilder := anObject
</methods> <methods> Seaside.SCTestBuilderSession <category>request handling</category>
performRequest: aRequest self testBuilder ifNotNilDo: [:tb | tb submittedRequest: aRequest]. super performRequest: aRequest
</methods> <methods> Seaside.SCInputWithLabel <category>rendering</category>
renderContentOn: html html form with: [html label for: 'someField'; with: 'some text'. html textInput id: 'someField'; callback: [:v | value := v]. html submitButton callback: [self answer]; value: 'button']
</methods> <methods> Seaside.SCInputWithLabel <category>accessing</category>
value ^ value
value: anObject ^ value := anObject
</methods> <methods> Seaside.SCSeasideEntity <category>testing</category>
isAnchor ^false
isButton ^false
isCheckbox ^false
isInputComponent ^false
isOption ^false
isRadioButton ^ false
isSeasideForm ^false
isSelectInput ^false
isTextEntity ^false
isTextInput ^false
</methods> <methods> Seaside.SCSeasideEntity <category>attributes</category>
attributeAt: name ^attributes at: name
attributeAt: name ifAbsent: aBlock ^self attributes at: name ifAbsent: aBlock
attributeAt: name ifPresent: aBlock ^self attributes at: name ifPresent: aBlock
cssClass ^self attributeAt: 'class' ifAbsent: []
cssId ^self attributeAt: 'id' ifAbsent: []
</methods> <methods> Seaside.SCSeasideEntity <category>contents</category>
addEntity: anElement self entities add: anElement
containsString: aString "Look deep into the containment hierarchy looking for the specified string" (self contentString includesSubString: aString) ifTrue: [^true]. ^self entities anySatisfy: [:each | each containsString: aString]
contentString | result | result := WriteStream on: String new. (self entities select: [:each | each isTextEntity]) do: [:textEntity | result nextPutAll: textEntity text]. ^result contents
entities ^entities ifNil: [entities := OrderedCollection new]
</methods> <methods> Seaside.SCSeasideEntity <category>accessing</category>
attributes ^attributes ifNil: [attributes := Dictionary new]
attributes: anObject attributes := anObject
tag "Return a lower case HTML tag describing this entity" self subclassResponsibility
</methods> <methods> Seaside.SCSeasideEntity <category>buttons</category>
buttons ^self allEntities select: [:each | each notNil and: [each isInputComponent and: [each isButton]]]
buttonWithValue: aString ^ self buttons detect: [:each | each value = aString] ifNone: [self error: 'no such button']
</methods> <methods> Seaside.SCSeasideEntity <category>forms</category>
forms | descendentForms | descendentForms := OrderedCollection new. self entities do: [:entity | entity ifNotNil: [descendentForms addAll: entity forms]]. ^self localForms , descendentForms
localForms ^self entities select: [:each | each notNil and: [each isSeasideForm]]
</methods> <methods> Seaside.SCSeasideEntity <category>private</category>
allElementsIn: element addTo: result result add: element. element elementsDo: [:subElement | self allElementsIn: subElement addTo: result]
allElementsWithTag: tagName in: element addTo: result element name = tagName ifTrue: [result add: element] ifFalse: [element elementsDo: [:subElement | self allElementsWithTag: tagName in: subElement addTo: result]]
entityWithId: id containsText: aString ^(self entityWithId: id) containsString: aString
</methods> <methods> Seaside.SCSeasideEntity <category>parts</category>
allEntities | result | result := OrderedCollection new. result addAll: self entities. self entities do: [:entity | entity ifNotNil: [result addAll: entity allEntities]]. ^result
entitiesNamed: aStringTagName ^self allEntities select: [:each | each tag = aStringTagName]
entitiesWithClass: aString ^self allEntities select: [:each | ((each attributeAt: 'class' ifAbsent: ['']) findTokens: ' ') includes: aString]
entityWithId: aString ^self entityWithId: aString ifAbsent: [self error: 'No such element.']
entityWithId: aString ifAbsent: aBlock ^self allEntities detect: [:each | each cssId = aString] ifNone: aBlock
</methods> <methods> Seaside.SCSeasideEntity <category>anchors</category>
anchors | descendentAnchors | descendentAnchors := OrderedCollection new. self entities do: [:entity | entity ifNotNil: [descendentAnchors addAll: entity anchors]]. ^self localAnchors , descendentAnchors
localAnchors ^self entities select: [ :each | each notNil and: [each isAnchor]]
</methods> <methods> Seaside.SCSeasideEntity <category>inputs</category>
inputs ^self allEntities select: [:each | each notNil and: [each isInputComponent]]
</methods> <methods> Seaside.SCSeasideGenericEntity <category>accessing</category>
tag ^tag asLowercase
tag: anObject tag := anObject
</methods> <methods> Seaside.SCSeasideForm <category>inputs</category>
activateCheckboxWithId: stringId self checkboxWithId: stringId value: true
activateRadioButtonWithId: stringId (self radioButtonWithId: stringId) makeSelected
checkboxWithId: stringId | input | input := self inputWithId: stringId ifAbsent: [self error: 'No such input component.']. input isCheckbox ifFalse: [self error: 'Not a checkbox component.']. ^input
checkboxWithId: stringId value: aBoolean (self checkboxWithId: stringId) value: aBoolean
deactivateCheckboxWithId: stringId self checkboxWithId: stringId value: false
inputsWithLabel: aString | labels | labels := self labelsWithText: aString. ^labels collect: [:label | self inputWithId: (label attributeAt: 'for') ifAbsent: [self error: 'No such input component.']].
labelsWithText: aString | labels | labels := self entitiesNamed: 'label'. ^labels select: [:each | each contentString = aString].
radioButtonWithId: stringId | input | input := self inputWithId: stringId ifAbsent: [self error: 'No such input component.']. input isRadioButton ifFalse: [self error: 'Not a radio button component.']. ^input
radioGroups ^radioGroups ifNil: [radioGroups := Dictionary new]
selectListWithId: aStringId | elem | elem := self inputWithId: aStringId ifAbsent: [self error: 'No such input field.']. elem isSelectInput ifFalse: [self error: 'Not a select']. ^ elem
selectListWithId: aStringId selectOptionWithText: text (self selectListWithId: aStringId) selectOptionWithText: text ifNone: [self error: 'No such option.']
textInputs ^self allEntities select: [:each | each isTextInput]
textInputWithId: stringId | input | input := self inputWithId: stringId ifAbsent: [self error: 'No such input component.']. input isTextInput ifFalse: [self error: 'Not a text component.']. ^input
textInputWithId: stringId value: stringValue (self textInputWithId: stringId) value: stringValue
</methods> <methods> Seaside.SCSeasideForm <category>accessing</category>
tag ^'form'
</methods> <methods> Seaside.SCSeasideForm <category>private-inputs</category>
getOrCreateRadioGroup: groupName ^self radioGroups at: groupName ifAbsentPut: [SCRadioGroup named: groupName].
inputsWithClass: aName ^self inputs select: [:each | each cssClass = aName]
inputWithId: anId ifAbsent: aBlock | res | res := self entityWithId: anId ifAbsent: [^aBlock value]. ^res isInputComponent ifTrue: [res] ifFalse: [aBlock value]
inputWithName: aName ifAbsent: aBlock self inputs detect: [:each | each name = aName] ifNone: aBlock
optionValuesByTextForSelect: aSelectElement | optionElements result | optionElements := aSelectElement elements select: [:each | each name = 'option']. result := Dictionary new. optionElements do: [:each | result at: (each contents first string) put: (each attributeAt: 'value') ]. ^result
</methods> <methods> Seaside.SCSeasideForm <category>testing</category>
isSeasideForm ^true
</methods> <methods> Seaside.SCSeasideForm <category>posting</category>
actionUrl ^ self attributeAt: 'action'
httpDataWithButton: button | resultStream nonButtonInputs | resultStream := WriteStream on: String new. button ifNotNil: [((button addToRequestStream: resultStream) and: [self inputs notEmpty]) ifTrue: [resultStream nextPut: $&]]. nonButtonInputs := self inputs reject: [:each | each isButton]. nonButtonInputs allButLast do: [:each | (each addToRequestStream: resultStream) ifTrue: [resultStream nextPut: $&]]. nonButtonInputs last addToRequestStream: resultStream. ^resultStream contents
writeHttpDataFor: key value: value on: stream | name | name := key. value ifNil: [^ stream nextPutAll: name]. value isString ifTrue: [stream nextPutAll: name; nextPut: $=; nextPutAll: value] ifFalse: [value do: [:each | self writeHttpDataFor: key value: each on: stream] separatedBy: [stream nextPut: $&]]
</methods> <methods> Seaside.SCSeasideForm class <category>instance creation</category>
withAttributes: attributes ^self new attributes: attributes; yourself
</methods> <methods> Seaside.SCHtmlInputComponent <category>testing</category>
isInputComponent ^true
</methods> <methods> Seaside.SCHtmlInputComponent <category>accessing</category>
name ^ self attributeAt: 'name' ifAbsent: []
tag ^'input'
</methods> <methods> Seaside.SCHtmlInputComponent <category>value</category>
value ^value
value: aValue self setValue: aValue
</methods> <methods> Seaside.SCHtmlInputComponent <category>private</category>
setValue: aValue value := aValue
</methods> <methods> Seaside.SCHtmlInputComponent <category>request</category>
addToRequestStream: aStream self name ifNil: [^false]. aStream nextPutAll: self name. self value ifNotNil: [aStream nextPut: $=. aStream nextPutAll: self value]. ^true
</methods> <methods> Seaside.SCHtmlInputComponent <category>initialize</category>
initializeForForm: aForm attributes: theAttributes self attributes: theAttributes. value := attributes at: 'value' ifAbsent: []. form := aForm
</methods> <methods> Seaside.SCHtmlInputComponent class <category>instance creation</category>
attributes: attributes form: aForm ^ self new initializeForForm: aForm attributes: attributes
</methods> <methods> Seaside.SCFileHtmlInput <category>request</category>
addToRequestStream: aStream ^self value ifNil: [false] ifNotNil: [super addToRequestStream: aStream]
</methods> <methods> Seaside.SCSelectOption <category>initialize</category>
initializeForSelect: aSelect attributes: theAttributes self attributes: theAttributes. value := attributes at: 'value'. selectInput := aSelect. (attributes includesKey: 'selected') ifTrue: [selectInput selectedOptions add: self]
</methods> <methods> Seaside.SCSelectOption <category>request</category>
addToRequestStream: aStream aStream nextPutAll: selectInput name; nextPut: $=; nextPutAll: value. ^ true
</methods> <methods> Seaside.SCSelectOption <category>accessing</category>
label ^self contentString
</methods> <methods> Seaside.SCSelectOption <category>testing</category>
isOption ^true
tag ^'select'
</methods> <methods> Seaside.SCSelectOption <category>processing</category>
select selectInput optionSelected: self
</methods> <methods> Seaside.SCSelectOption class <category>instance creation</category>
select: aSelect attributes: attributes ^ self new initializeForSelect: aSelect attributes: attributes
</methods> <methods> Seaside.SCSubmitButtonHtmlInput <category>testing</category>
isButton ^true
</methods> <methods> Seaside.SCTextHtmlInput <category>testing</category>
isTextInput ^true
</methods> <methods> Seaside.SCTextHtmlInput <category>request</category>
addToRequestStream: aStream ^self value ifNil: [false] ifNotNil: [super addToRequestStream: aStream]
</methods> <methods> Seaside.SCSeasideStateMarker <category>accessing</category>
continuationId ^continuationId
continuationId: anObject continuationId := anObject
sessionId ^sessionId
sessionId: anObject sessionId := anObject
</methods> <methods> Seaside.SCSeasideAnchor <category>initialize</category>
initializeFromHref: aString | parts | self fullUrl: aString. parts := aString findTokens: '?'. parts isEmpty ifTrue: [^ self]. aString first == $? ifTrue: [parts addFirst: String new]. self path: parts first. parts size > 1 ifTrue: [(parts second findTokens: '&') do: [:each | self variableFromString: each]]
variableFromString: aString | parts | parts := aString findTokens: '='. parts isEmpty ifTrue: [^ nil]. parts size = 1 ifTrue: [^ self anchorNumber: parts first]. parts first = '_s' "WARegistry>>handlerField" ifTrue: [^ self sessionId: parts second]. parts first = '_k' "WASession>>actionField" ifTrue: [^ self continuationId: parts second]
</methods> <methods> Seaside.SCSeasideAnchor <category>accessing</category>
anchorNumber ^anchorNumber
anchorNumber: anObject anchorNumber := anObject
basePath: aString (fullUrl findTokens: '/') first = fullUrl ifTrue: [fullUrl := aString , fullUrl]
fullUrl: aString fullUrl := aString
label ^self contentString
path: aString path := aString
tag ^'a'
</methods> <methods> Seaside.SCSeasideAnchor <category>converting</category>
asString ^ fullUrl
</methods> <methods> Seaside.SCSeasideAnchor <category>testing</category>
isAnchor ^true
</methods> <methods> Seaside.SCSeasideAnchor class <category>instance creation</category>
withAttributes: attributes ^self new initializeFromHref: (attributes at: 'href'); attributes: attributes; yourself
</methods> <methods> Seaside.SCSelectHtmlInput <category>private-options</category>
options ^self allEntities select: [:each | each isOption]
optionSelected: anOption selectedOptions := Array with: anOption
selectedOptions ^selectedOptions ifNil: [selectedOptions := OrderedCollection new]
</methods> <methods> Seaside.SCSelectHtmlInput <category>value</category>
selectOptionWithText: text self selectOptionWithText: text ifNone: [self error: 'No option labeled ' , text.]
selectOptionWithText: text ifNone: aBlock | option | option := self options detect: [:each | each label = text] ifNone: [^aBlock value]. option select
value: aValue self selectOptionWithText: aValue
</methods> <methods> Seaside.SCSelectHtmlInput <category>testing</category>
isSelectInput ^ true
</methods> <methods> Seaside.SCSelectHtmlInput <category>request</category>
addToRequestStream: aStream self selectedOptions do: [:option | option addToRequestStream: aStream] separatedBy: [aStream nextPut: $&]. ^self selectedOptions notEmpty
</methods> <methods> Seaside.SCSeasideTextEntity <category>accessing</category>
tag ^'none'
text ^text
text: anObject text := anObject
</methods> <methods> Seaside.SCSeasideTextEntity <category>testing</category>
isTextEntity ^true
</methods> <methods> Seaside.SCSeasideTextEntity class <category>instance creation</category>
on: aString ^self new text: aString
</methods> <methods> Seaside.SCCheckboxHtmlInput <category>testing</category>
isCheckbox ^ true
</methods> <methods> Seaside.SCCheckboxHtmlInput <category>value</category>
check self setValue: true
uncheck self setValue: false
value: aValue aValue ifTrue: [self check] ifFalse: [self uncheck]
</methods> <methods> Seaside.SCCheckboxHtmlInput <category>initialize</category>
initializeForForm: aForm attributes: theAttributes super initializeForForm: aForm attributes: theAttributes. value := attributes includes: 'checked'.
</methods> <methods> Seaside.SCCheckboxHtmlInput <category>request</category>
addToRequestStream: aStream self value ifTrue: [aStream nextPutAll: self name]. ^self value
</methods> <methods> Seaside.SCSeasideResponse <category>parts</category>
anchorsIncludingString: aString ^self anchors select: [:anchor | anchor containsString: aString]
anchorsWithClass: aString ^ self anchors select: [:anchor | anchor cssClass = aString]
anchorsWithLabel: aString ^ self anchors select: [:anchor | anchor label = aString]
anchorWithId: aString ^self anchorWithId: aString ifNone: []
anchorWithId: aString ifNone: aBlock ^self entityWithId: aString ifAbsent: aBlock
anchorWithLabel: aString ^ self anchors detect: [:anchor | anchor label = aString] ifNone: []
anchorWithLabel: aString ifNone: aBlock ^ self anchors detect: [:anchor | anchor label = aString] ifNone: aBlock
bodyElement ^self entities first entities detect: [:each | each tag asUppercase = 'BODY']
formWithId: aString ^ self formWithId: aString ifNone: []
formWithId: aString ifNone: aBlock ^self entityWithId: aString ifAbsent: aBlock
fullStringContents ^httpResponse contents contents
stringWithId: anId ^(self entityWithId: anId) contentString
</methods> <methods> Seaside.SCSeasideResponse <category>HTTP info</category>
contents ^self httpResponse contents contents
cookies ^httpResponse cookies
httpResponse ^httpResponse
status ^httpResponse status
</methods> <methods> Seaside.SCSeasideResponse <category>private</category>
httpResponse: anObject httpResponse := anObject
</methods> <methods> Seaside.SCRadioButtonHtmlInput <category>value</category>
makeSelected group selectRadioButton: self
makeUnselected self privateMakeUnselected
value: aValue aValue ifTrue: [self makeSelected] ifFalse: [self makeUnselected]
</methods> <methods> Seaside.SCRadioButtonHtmlInput <category>initialize</category>
initializeForGroup: aGroup form: aForm attributes: theAttributes self initializeForForm: aForm attributes: theAttributes. group := aGroup. internalValue := value. value := attributes includesKey: 'checked'.
</methods> <methods> Seaside.SCRadioButtonHtmlInput <category>testing</category>
isRadioButton ^true
isSelected ^ value ifNil: [value := false]
</methods> <methods> Seaside.SCRadioButtonHtmlInput <category>request</category>
addToRequestStream: aStream ^ self value and: [self name ifNil: [false] ifNotNil: [aStream nextPutAll: self name. aStream nextPut: $=. aStream nextPutAll: internalValue. true]]
</methods> <methods> Seaside.SCRadioButtonHtmlInput <category>private-value</category>
privateMakeSelected self setValue: true
privateMakeUnselected self setValue: false
</methods> <methods> Seaside.SCRadioButtonHtmlInput class <category>instance creation</category>
group: aGroup attributes: theAttributes form: aForm ^self new initializeForGroup: aGroup form: aForm attributes: theAttributes
</methods> <methods> Seaside.SCTestingPseudomain <category>accessing</category>
start: aRequest storedSession := self session. self session redirect. (renderLoop := SCRenderLoop new root: self createRoot) run
storedSession ^ storedSession
</methods> <methods> Seaside.SCTestingPseudomain <category>hack</category>
new "We pretend like we're a class...sorry" ^self
</methods> <methods> Seaside.SCFileDownloadComponent <category>rendering</category>
renderContentOn: html html heading level:1; with: 'Tests'. html break. html anchor document: 'some text that may be read from somewhere' mimeType: 'text/plain' fileName: 'myfilename.txt'; with: 'Download file'
</methods> <methods> Seaside.SCFileDownloadComponent class <category>testing</category>
canBeRoot ^true.
</methods> <methods> Seaside.SCExceptionDuringRendering <category>rendering</category>
renderContentOn: html SCTestException signal
</methods> <methods> Seaside.SCTestErrorHandler <category>accessing</category>
case ^case
case: anObject case := anObject
</methods> <methods> Seaside.SCTestErrorHandler <category>actions</category>
handleError: e self case errorOccurred: e. super handleError: e
</methods> <methods> Seaside.HttpHeader <category>accessing</category>
at: fieldName ^ (self header at: fieldName asLowercase) value
header ^header
header: anObject header := anObject
</methods> <methods> Seaside.SCTestBuilder <category>initialization</category>
initialize super initialize. component := WAMiniCalendar new. self session testBuilder: self.
</methods> <methods> Seaside.SCTestBuilder <category>accessing</category>
children ^Array with: component
requests ^requests ifNil: [requests := OrderedCollection new]
</methods> <methods> Seaside.SCTestBuilder <category>request handling</category>
submittedRequest: aRequest self requests add: aRequest
</methods> <methods> Seaside.SCTestBuilder <category>rendering</category>
renderContentOn: html html render: component. html orderedList list: self requests; labels: [:request | request url printString , ': ' , request fields printString]
</methods> <methods> Seaside.SCTestBuilder class <category>testing</category>
canBeRoot ^true
</methods> <methods> Seaside.SCCanvasComponentTest <category>running</category>
testFormComponent | form | self newApplicationWithRootClass: SCTestComponent7. form := self establishSession forms first. self submitForm: form pressingButton: form buttons first. self assert: (self componentAnswered: true)
</methods> <methods> Seaside.SCTestComponent6 <category>rendering</category>
itemSelected: item selectedItem := item. self inform: item printString
renderContentOn: html html form: [html select id: 'theList'; list: #(a b c); selected: #a; callback: [:item | self itemSelected: item]. html textInput callback: []. html submitButton value: 'submit']
</methods> <methods> Seaside.SCTestComponent6 <category>accessing</category>
selectedItem ^selectedItem
</methods> <methods> Seaside.DTDEntityDeclaration <category>initialize-release</category>
name: aString value: anObject name := aString. value := anObject
</methods> <methods> Seaside.DTDEntityDeclaration <category>accessing</category>
name ^name
value ^value
</methods> <methods> Seaside.DTDEntityDeclaration class <category>instance creation</category>
name: aString value: anObject ^self new name: aString value: anObject
</methods> <methods> Seaside.SCTestComponent2 <category>accessing</category>
firstSent ^firstSent
renderContentOn: html html anchor id: 'first'; callback: [self sendFirst]; with: 'first link'. html text: 'hello'. html anchor id: 'second'; callback: [self sendSecond]; with: 'second link'
secondSent ^secondSent
</methods> <methods> Seaside.SCTestComponent2 <category>initialization</category>
initialize super initialize. firstSent := false. secondSent := false.
</methods> <methods> Seaside.SCTestComponent2 <category>callbacks</category>
sendFirst firstSent := true
sendSecond secondSent := true
</methods> <methods> Seaside.SCTestComponent2 class <category>seaside</category>
canBeRoot ^true
</methods> <methods> SeasidePlatformSupport class <category>SeasideTesting</category>
issueRequest: anHttpRequest responseSemaphore: semaphore | save | save := Net.Settings httpRedirectRequest. Net.Settings httpRedirectRequest: false. [^anHttpRequest execute] ensure: [Net.Settings httpRedirectRequest: save]
parseSeasideDocumentFrom: aStream | parser handler| parser:= Seaside.XMLDOMParser on: aStream. handler := Seaside.SCSeasideResponseParser new. handler document: Seaside.SCSeasideResponse new. parser saxDriver: handler. parser validate: false. ^parser scanDocument
testSuiteClass ^XProgramming.SUnit.TestSuite
</methods> <methods> XML.Text <category>wrapping</category>
asXMLNode ^ Seaside.XMLText fromNode: self
</methods> <methods> Squeak.Preferences class <category>*SeasideTesting</category>
testRunnerShowAbstractClasses ^true
</methods> <methods> XML.Document <category>wrapping</category>
asXMLNode ^ Seaside.XMLDocument fromNode: self.
</methods> <methods> XML.Element <category>wrapping</category>
asXMLNode ^ Seaside.XMLElement fromNode: self.
</methods> <methods> XML.Node <category>wrapping</category>
asXMLNode self subclassResponsibility
</methods> <methods> OS.URLwithPath <category>resolution</category>
resolveRelativePath: pathString | copy | ('//*' match: pathString) ifTrue: [^self class fromString: pathString]. self class resolvePath: pathString do: [ :pathx :queryx :fragmentx | copy := self copy. copy query: queryx; fragment: fragmentx. pathx first isEmpty ifTrue: [copy path: #(). pathx removeFirst] ifFalse: [copy removeLastComponent]. pathx do: [ :each | copy addComponent: ( self class decode: each) ]]. ^copy
</methods> <methods> Seaside.WAPresenter class <category>*SeasideTesting</category>
hasTestSuite ^self suite notNil
suite ^ (Smalltalk hasClassNamed: self testSuiteName) ifTrue: [(Smalltalk classNamed: self testSuiteName) suite]
testSuiteName ^(self name , 'Test') asSymbol
</methods> <initialize> Seaside.SCTestCaseViewer </initialize> <initialize> Seaside.SCTestRunner </initialize> "Imported Classes:" self error: 'Attempting to file-in parcel imports. Choose terminate or close' <class> <name>Object</name> <environment>Core</environment> <super></super> <private>false</private> none <imports></imports> <category>Kernel-Objects</category> <attributes> <package>Kernel-Objects</package> </attributes> </class> <class> <name>WADecoration</name> <environment>Seaside</environment> <super>Seaside.WAPresenter</super> <private>false</private> none next <imports></imports> <category>Seaside-Component</category> <attributes> <package>Seaside-Component</package> </attributes> </class> <class> <name>WARenderLoopMain</name> <environment>Seaside</environment> <super>Seaside.WAMain</super> <private>false</private> none <imports></imports> <category>Seaside-RenderLoop</category> <attributes> <package>Seaside-RenderLoop</package> </attributes> </class> <class> <name>WASession</name> <environment>Seaside</environment> <super>Seaside.WAExpiringHandler</super> <private>false</private> none continuations escapeContinuation monitor state currentRequest scripts jumpTo internalError cookiesEnabled <imports></imports> <category>Seaside-Session</category> <attributes> <package>Seaside-Session</package> </attributes> </class> <class> <name>TestCase</name> <environment>XProgramming.SUnit</environment> <super>Core.Object</super> <private>false</private> none testSelector <imports></imports> <category>SUnit</category> <attributes> <package>SUnit</package> </attributes> </class> <class> <name>SeasidePortStrategy</name> <environment>Smalltalk</environment> <super>Core.Object</super> <private>false</private> objects <imports></imports> <category>Seaside/VW Support</category> <attributes> <package>Seaside-VW-PortTool</package> </attributes> </class> <class> <name>XMLParser</name> <environment>XML</environment> <super>Core.Object</super> <private>false</private> none sourceStack hereChar hereCharNumBytes lastSource currentSource dtd unresolvedIDREFs definedIDs latestID sax elementStack validating flags eol buffer nameBuffer <imports></imports> <category>XML-Parsing</category> <attributes> <package>XML</package> </attributes> </class> <class> <name>SAXDriver</name> <environment>XML</environment> <super>Core.Object</super> <private>false</private> none locator <imports></imports> <category>XML-SAX</category> <attributes> <package>XML</package> </attributes> </class> <class> <name>WAFileLibrary</name> <environment>Seaside</environment> <super>Seaside.WALibrary</super> <private>false</private> none default <imports></imports> <category>Seaside-Libraries</category> <attributes> <package>Seaside-Libraries</package> </attributes> </class> <class> <name>Error</name> <environment>Core</environment> <super>Core.Exception</super> <private>false</private> none <imports></imports> <category>Kernel-Exception Handling</category> <attributes> <package>Kernel-Exception Handling</package> </attributes> </class> <class> <name>WAWalkbackErrorHandler</name> <environment>Seaside</environment> <super>Seaside.WAErrorHandler</super> <private>false</private> none <imports></imports> <category>Seaside-RenderLoop</category> <attributes> <package>Seaside-RenderLoop</package> </attributes> </class> <class> <name>Node</name> <environment>XML</environment> <super>Core.Object</super> <private>false</private> none parent flags userData <imports></imports> <category>XML-Nodes</category> <attributes> <package>XML</package> </attributes> </class> <class> <name>Text</name> <environment>XML</environment> <super>XML.Node</super> <private>false</private> none text stripped <imports></imports> <category>XML-Nodes</category> <attributes> <package>XML</package> </attributes> </class> <class> <name>Document</name> <environment>XML</environment> <super>XML.Node</super> <private>false</private> none root nodes dtd ids <imports></imports> <category>XML-Nodes</category> <attributes> <package>XML</package> </attributes> </class> <class> <name>Element</name> <environment>XML</environment> <super>XML.Node</super> <private>false</private> none tag attributes namespaces elements definition <imports></imports> <category>XML-Nodes</category> <attributes> <package>XML</package> </attributes> </class> <class> <name>WAApplication</name> <environment>Seaside</environment> <super>Seaside.WARegistry</super> <private>false</private> none configuration libraries <imports></imports> <category>Seaside-Session</category> <attributes> <package>Seaside-Session</package> </attributes> </class> <class> <name>WAComponent</name> <environment>Seaside</environment> <super>Seaside.WAPresenter</super> <private>false</private> none decoration <imports></imports> <category>Seaside-Component</category> <attributes> <package>Seaside-Component</package> </attributes> </class> <class> <name>WATask</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none <imports></imports> <category>Seaside-Component</category> <attributes> <package>Seaside-Component</package> </attributes> </class> <class> <name>URLwithPath</name> <environment>OS</environment> <super>OS.URL</super> <private>false</private> none path query fragment <imports></imports> <category>Net-Resources</category> <attributes> <package>URISupport</package> </attributes> </class> <class> <name>WARenderLoop</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none root <imports></imports> <category>Seaside-RenderLoop</category> <attributes> <package>Seaside-RenderLoop</package> </attributes> </class>