Browser side Pluglet API tests description. (first draft,30 November 1999) Contents: 1. Methods of interface PlugletManager: 1.1 getURL 1.3 postURL 1.4 reloadPluglets 1.5 userAgent 2. Methods of interface PlugletPeer: 2.1 getMIMEType 2.2 getMode 2.3 getTagInfo 2.4 getValue 2.5 newStream 2.6 setWindowSize 2.7 showStatus 3. Methods of interface PlugletStreamInfo: 3.1 getContentType 3.2 getLastModified 3.3 getLength 3.4 getURL 3.5 isSeekable 3.6 requestRead 4. Methods of interface PlugletTagInfo: 4.2 getAttribute 4.3 getAttributes 5. Methods of interface PlugletTagInfo2: 5.1 getAlignment 5.2 getAttribute 5.3 getAttributes 5.4 getBorderHorizSpace 5.5 getBorderVertSpace 5.6 getDocumentBase 5.7 getDocumentEncoding 5.8 getHeight 5.9 getTagText 5.10 getTagType 5.11 getUniqueID 5.12 getWidth Description: 1. Methods of PlugletManager interface 1.1 Tests for method getURL of PlugletManager interface. Method description: Via this method pluglet can request any URL and paint it on browser window or fetch it self. Method's state: doesn't work(Pluglet's plugin code doesn't exist) Test IDs: basic/api/PlugletManager_getURL:n (where n integer, see BWTest.lst.ORIG for it values) Test Directory: PlugletManager_getURL Recent files: PlugletManager_getURL_128.java PlugletManager_getURL_Iterator.java Arguments: See ParamCombinations and TestParameters for argument's values. Check result: Possible a good way to do it is JavaScript, well received and rendered page can say pluglet:"All OK :)" Comments: Now test just iterate a set of arguments and call method. JNI realization of this method is not yet implemented, so can't check results of it execution. 1.3 Tests for method postURL of PlugletManager interface. Method description: This method used for post some data and get browser's answer. Method's state: doesn't work Test IDs: basic/api/PlugletManager_postURL:n (where n integer, see BWTest.lst.ORIG for it values) Test Directory: PlugletManager_postURL Recent files: PlugletManager_postURL_9216.java PlugletManager_postURL_Iterator.java Arguments: See ParamCombinations and TestParameters for argument's values. Check result: Not implemented.Possible a good way to do it is CGI script for receive and check posted data and generate valid answer. Comments: Now test just iterate a set of arguments and call method. JNI realization of this method is not yet implemented, so can't check results of it execution. 1.4 Tests for method reloadPluglets of PlugletManager interface. Method description: Via this method pluglet can request browser to reload pluglets from disk, so if new pluglet jars available in the pluglets location dir, new mime types should be handled successfully. Method's state: doesn't work Test IDs: basic/api/PlugletManager_reloadPluglets:n (where n integer, see BWTest.lst.ORIG for it values) Test Directory: PlugletManager_reloadPluglets Recent files: PlugletManager_reloadPluglets_2.java PlugletManager_reloadPluglets_Iterator.java Arguments: See ParamCombinations and TestParameters for argument's values. Check result: From current point of view a good way to check such behavior is verify output from second pluglet. Now this test used 2 pluglets main and second, second pluglet located in test dir, SecondPluglet.jar and copied to pluglets dir during test execution. Also applet used to delete a SecondPluglet.jar from pluglet's dir (it can appear here from previous tests). Sequence: 1.First page with DelApp delete SecondPluglet.jar from pluglet's dir and load page with test pluglet. 2.TestPluglet copying SecondPluglet.jar to the pluglet's dir , call reloadPluglets method of PlugletManager and load page with SecondPluglet. 3.If pluglets was successfully reloaded then SecondPluglet initialized and say to test context:"All O Comments: You must grant permissions for test and applet for copying and deletion files on your filesystem. NOTE:Check for page reloading should be added 1.5 Tests for method userAgent of PlugletManager interface. Method description: Via this method pluglet can access to the current user agent name. Method's state: Methods work correctly Test ID: basic/api/PlugletManager_userAgent Test Directory: PlugletManager_userAgent Recent files: PlugletManager_userAgent_0.java PlugletManager_userAgent_Iterator.java Arguments: none Check result: JavaScript used to check result of this method execution. JavaScript window.navigator.userAgent value transfered to pluglet and compared with value, returned by method. If values are equals then test PASSED. Comments: Now static string used to indentify userAgent in plugins and this string differen from window.navigator.userAgent 2. Methods of PlugletPeer interface 2.1 Tests for method getMIMEType of PlugletPeer interface. Method description: Via this method pluglet can access to MIME type, witch it was instantiated. Method's state: work now. Test ID: basic/api/PlugletPeer_getMIMEType Test Directory: PlugletPeer_getMIMEType Recent files: PlugletPeer_getMIMEType_0.java PlugletPeer_getMIMEType_Iterator.java Arguments: none Check result: MIME type value transfered to pluglet via JavaScript and compared with returned by getMIMEType method. If values are equals then test PASSED Comments: Test for pluglet with multiple mime-types should be added. 2.2 Tests for method getMode of PlugletPeer interface. Method description: This method returns a pluglet mode,possible modes is full page and embedded. Method's state: Method always return 1(corresponds to embedded pluglets) Test IDs: basic/api/PlugletPeer_getMode Test Directory: PlugletPeer_getMode Recent files: PlugletPeer_getMode_0.java PlugletPeer_getMode_Iterator.java Arguments: none Check result: Expected value of instantiation mode pluglet read from TestProperties(located in test dir). Expected value compared with returned by getMode method and if they are equals then test PASSED. Comments: Test for full page pluglets should be added. 2.3 Tests for method getTagInfo of PlugletPeer interface. Method description: This method return a PlugletTagInfo object. Via this object pluglet can access to miscellaneous tag information. Method's state: work Test IDs: basic/api/PlugletPeer_getTagInfo:n (where n integer, see BWTest.lst.ORIG for it values) Test Directory: PlugletPeer_getTagInfo Recent files: PlugletPeer_getTagInfo_0.java PlugletPeer_getTagInfo_Iterator.java Arguments: none Check result: For verify results PlugletTagInfo.getAttribute method used. Returned by getAttribute value compared with value, transfered to pluglet via JavaScript and if they equals then test PASSED. Now "type" attribute used to verify a validity of PlugletTagInfo object Comments: 2.4 Tests for method getValue of PlugletPeer interface. Method description: This method returns value of variable, associated with PlugletPeer. Method's state: doesn't work Test IDs: basic/api/PlugletPeer_getValue:n (where n integer, see BWTest.lst.ORIG for it values) Test Directory: PlugletPeer_getValue Recent files: PlugletPeer_getValue_3.java PlugletPeer_getValue_Iterator.java Arguments: See ParamCombinations and TestParameters for argument's values. Check result: Method doesn't work, check not implemented Comments: 2.5 Tests for method newStream of PlugletPeer interface. Method description: This method used to create stream for transfer data from pluglet to browser, browser should render, save, .. etc received data corresponding to data's MIME type. Method's state: doesn't work Test IDs: basic/api/PlugletPeer_newStream_0:n (where n integer, see BWTest.lst.ORIG for it values) Test Directory: PlugletPeer_newStream_0 Recent files: PlugletPeer_newStream_4.java PlugletPeer_newStream_Iterator.java Arguments: See ParamCombinations and TestParameters for argument's values. Check result: This test just iterate method's arguments, can't verify results, because method doesn't work. Possible a good way to check result is JavaScript, embedded in send ed data or in another frame of frameset Comments: Test IDs: basic/api/PlugletPeer_newStream_1:n (where n integer, see BWTest.lst.ORIG for it values) PlugletPeer_newStream_1 PlugletPeer_newStream_1 Recent files: PlugletPeer_newStream_4.java PlugletPeer_newStream_Iterator.java Arguments: In test dir PlugletPeer_newStream_1 see ParamCombinations and TestParameters for argument's values. Check result: This test used text/html MIME type for new stream, so check implemented via JavaScript, embedded in posted data. If page correctly loaded and rendered, then JavaScript just say pluglet: "All OK" Comments: 2.6 Tests for method setWindowSize of PlugletPeer interface. Method description: This method used to change browser widow size. Method's state: doesn't work Test IDs: basic/api/PlugletPeer_setWindowSize:n (where n integer, see BWTest.lst.ORIG for it values) Test Directory: PlugletPeer_setWindowSize Recent files: PlugletPeer_setWindowSize_9.java PlugletPeer_setWindowSize_Iterator.java Arguments: See ParamCombinations and TestParameters for argument's values. Check result: JavaScript used to verify results. Sequence: 1.Page with test pluglet loaded,pluglet instantiated 2.After some time (about 5 seconds after page initialization) JavaScript transfer current window size to pluglet. 3.Pluglet compare values from JavaScript and arguments of setWindowSize method and if they equals then test PASSED. Comments: 2.7 Tests for method showStatus of PlugletPeer interface. Method description: This method used to display a string in the browser's status line. Method's state: doesn't work Test IDs: basic/api/PlugletPeer_showStatus:n (where n integer, see BWTest.lst.ORIG for it values) Test Directory: PlugletPeer_showStatus Recent files: PlugletPeer_showStatus_2.java PlugletPeer_showStatus_Iterator.java Arguments: See ParamCombinations and TestParameters for argument's values. Check result: Implemented via JavaScript, after small timeout value of window.status transfered to pluglet and compared with argument of showStatus.If they values are equals then test PASSED. Comments: 3. Methods of PlugletStreamInfo interface 3.1 Tests for method getContentType of PlugletStreamInfo interface. Method description: This method used to get stream's content type Method's state: work Test ID: basic/api/PlugletStreamInfo_getContentType Test Directory: PlugletStreamInfo_getContentType Recent files: PlugletStreamInfo_getContentType_0.java PlugletStreamInfo_getContentType_Iterator.java Arguments: none Check result: Check result implemented via JavaScript, when pluglet instantiated JavaScript transfer content type of src data to pluglet.Pluglet compare it with value, returned by getContentType method and if they equals then method PASSED Comments: 3.2 Tests for method getLastModified of PlugletStreamInfo interface. Method description: This method used for access to Last Modified stream field. Method's state: doesn't work Test ID: basic/api/PlugletStreamInfo_getLastModified Test Directory: PlugletStreamInfo_getLastModified Recent files: PlugletStreamInfo_getLastModified_0.java PlugletStreamInfo_getLastModified_Iterator.java Arguments: none Check result: Not implemented.Possible a good way to check result is create from pluglet URLConnection to file, used in src and compare URLConnection's LastModified values with returned by getLasModified method.Or use CGI script to generate Last Modified field. Comments: Always return 0 now. 3.3 Tests for method getLength of PlugletStreamInfo interface. Method description: This method used to get length of stream's data.(Content Length field) Method's state: work Test ID: basic/api/PlugletStreamInfo_getLength Test Directory: PlugletStreamInfo_getLength Recent files: PlugletStreamInfo_getLength_0.java PlugletStreamInfo_getLength_Iterator.java Arguments: Check result: Java Script used to transfer file name, used in embed's src attribute. Pluglet used a URLConnection.getContentLength method to get right value for ContentLength field. And then compare it with value, returned by getLength method.If they values are equals then test PASSED. Comments: 3.4 Tests for method getURL of PlugletStreamInfo interface. Method description: This method used for access to stream's URL Method's state: work Test ID: basic/api/PlugletStreamInfo_getURL Test Directory: PlugletStreamInfo_getURL Recent files: PlugletStreamInfo_getURL_0.java PlugletStreamInfo_getURL_Iterator.java Arguments: none Check result: Java Script used to transfer file name, used in embed's src attribute. Pluglet use HTML_ROOT property(from CommonProperties) and src's file name to construct expected URL.Expected value compared with returned by getURL method and if they equals then test PASSED Comments: 3.5 Tests for method isSeekable of PlugletStreamInfo interface. Method description: Method's state: always return true Test ID: basic/api/PlugletStreamInfo_isSeekable Test Directory: PlugletStreamInfo_isSeekable Recent files: PlugletStreamInfo_isSeekable_0.java PlugletStreamInfo_isSeekable_Iterator.java Arguments: none Check result: Now expected result specified via properties.For most streams seekable is false.Additional test should be added for another streams Comments: 3.6 Tests for method requestRead of PlugletStreamInfo interface. Method description: This method allow to pluglet request data from stream Method's state: doesn't work Test IDs: basic/api/PlugletStreamInfo_requestRead:n (where n integer, see BWTest.lst.ORIG for it values) Test Directory: PlugletStreamInfo_requestRead Recent files: PlugletStreamInfo_requestRead_2.java PlugletStreamInfo_requestRead_Iterator.java Arguments: See ParamCombinations and TestParameters for argument's values. Check result: Not implemented Comments: 4. Methods of PlugletTagInfo interface 4.1 Tests for method getAttribute of PlugletTagInfo interface. Method description: This method used to get tag attributes Method's state: work Test IDs: basic/api/PlugletTagInfo_getAttribute:n (where n integer, see BWTest.lst.ORIG for it values) Test Directory: PlugletTagInfo_getAttribute Recent files: PlugletTagInfo_getAttribute_2.java PlugletTagInfo_getAttribute_Iterator.java Arguments: String attrName See ParamCombinations and TestParameters for argument's values. Check result: Check implemeted via JavaScript function, that analyze embed or object tag node and transfer all tag's attributes to pluglet. Pluglet can verify they values and compare with returned by getAttribute. Comments: 4.2 Tests for method getAttributes of PlugletTagInfo interface. Method description: This method allow to pluglet get all tag attributes. Method's state: work Test ID: basic/api/PlugletTagInfo_getAttributes Test Directory: PlugletTagInfo_getAttributes Recent files: PlugletTagInfo_getAttributes_0.java PlugletTagInfo_getAttributes_Iterator.java Arguments: none Check result: Check implemeted via JavaScript function, that analyze embed or object tag node and transfer all tag's attributes to pluglet. Pluglet can verify they values and compare with returned by getAttributes. Comments: 5. Methods of PlugletTagInfo2 interface 5.1 Tests for method getAlignment of PlugletTagInfo2 interface. Method description: Method's state: doesn't work Test IDs: basic/api/PlugletTagInfo2_getAlignment Test Directory: PlugletTagInfo2_getAlignment Recent files: PlugletTagInfo2_getAlignment_0.java PlugletTagInfo2_getAlignment_Iterator.java Arguments: See ParamCombinations and TestParameters for argument's values. Check result: Not implemented. Comments: 5.2 Tests for method getAttribute of PlugletTagInfo2 interface. Method description: This method used to get tag attributes Method's state: work Test IDs: basic/api/PlugletTagInfo2_getAttribute:n (where n integer, see BWTest.lst.ORIG for it values) Test Directory: PlugletTagInfo2_getAttribute Recent files: PlugletTagInfo2_getAttribute_2.java PlugletTagInfo2_getAttribute_Iterator.java Arguments: String attrName See ParamCombinations and TestParameters for argument's values. Check result: Check implemeted via JavaScript function, that analyze embed or object tag node and transfer all tag's attributes to pluglet. Pluglet can verify they values and compare with returned by getAttribute. Comments: 5.3 Tests for method getAttributes of PlugletTagInfo2 interface. Method description: This method allow to pluglet get all tag attributes. Method's state: work Test ID: basic/api/PlugletTagInfo2_getAttributes Test Directory: PlugletTagInfo2_getAttributes Recent files: PlugletTagInfo2_getAttributes_0.java PlugletTagInfo2_getAttributes_Iterator.java Arguments: none Check result: Check implemeted via JavaScript function, that analyze embed or object tag node and transfer all tag's attributes to pluglet. Pluglet can verify they values and compare with returned by getAttributes. Comments: 5.4 Tests for method getBorderHorizSpace of PlugletTagInfo2 interface. Method description: This method used for access hspace attribute value Method's state: work Test ID: basic/api/PlugletTagInfo2_getBorderHorizSpace Test Directory: PlugletTagInfo2_getBorderHorizSpace Recent files: PlugletTagInfo2_getBorderHorizSpace_0.java PlugletTagInfo2_getBorderHorizSpace_Iterator.java Arguments: none Check result: At this test EMBED tag doesn't contains hspace attribute, so default value should be returned. Comments: Test ID: basic/api/PlugletTagInfo2_getBorderHorizSpace_1 Test Directory: PlugletTagInfo2_getBorderHorizSpace_1 Recent files: PlugletTagInfo2_getBorderHorizSpace_0.java PlugletTagInfo2_getBorderHorizSpace_Iterator.java Arguments: none Check result: At this test tag EMBED has hspace attribute and it value transfered to pluglet via JavaScript.Then this value compared with returned by getBorderHorizSpace and if they equals then test PASSED Comments: 5.5 Tests for method getBorderVertSpace of PlugletTagInfo2 interface. Method description: This method used for access vspace attribute. Method's state: work Test ID: basic/api/PlugletTagInfo2_getBorderVertSpace Test Directory: PlugletTagInfo2_getBorderVertSpace Recent files: PlugletTagInfo2_getBorderVertSpace_0.java PlugletTagInfo2_getBorderVertSpace_Iterator.java Arguments: See ParamCombinations and TestParameters for argument's values. Check result: At this test EMBED tag doesn't contains vspace attribute, so default value should be returned. Comments: Test ID: basic/api/PlugletTagInfo2_getBorderVertSpace_1 Test Directory: PlugletTagInfo2_getBorderVertSpace_1 Recent files: PlugletTagInfo2_getBorderVertSpace_0.java PlugletTagInfo2_getBorderVertSpace_Iterator.java Arguments: See ParamCombinations and TestParameters for argument's values. Check result: At this test tag EMBED has vspace attribute and it value transfered to pluglet via JavaScript.Then this value compared with returned by getBorderHorizSpace and if they equals then test PASSED Comments: 5.6 Tests for method getDocumentBase of PlugletTagInfo2 interface. Method description: Returns the URL of the document containing a pluglet instance Method's state: work Test IDs: basic/api/PlugletTagInfo2_getDocumentBase Test Directory: PlugletTagInfo2_getDocumentBase Recent files: PlugletTagInfo2_getDocumentBase_0.java PlugletTagInfo2_getDocumentBase_Iterator.java Arguments: none Check result: Check implemeted via JavaScriptfunction, that transfer window.location value from JavaScript to pluglet and compare it with value, returned by getDocumentBase. Comments: 5.7 Tests for method getDocumentEncoding of PlugletTagInfo2 interface. Method description: This method used to access document encoding Method's state: doesn't work Test ID: basic/api/PlugletTagInfo2_getDocumentEncoding Test Directory: PlugletTagInfo2_getDocumentEncoding Recent files: PlugletTagInfo2_getDocumentEncoding_0.java PlugletTagInfo2_getDocumentEncoding_Iterator.java Arguments: none Check result: Not implemented Comments: 5.8 Tests for method getHeight of PlugletTagInfo2 interface. Method description: This method used to access height attribute value Method's state: work Test ID: basic/api/PlugletTagInfo2_getHeight Test Directory: PlugletTagInfo2_getHeight Recent files: PlugletTagInfo2_getHeight_0.java PlugletTagInfo2_getHeight_Iterator.java Arguments: none Check result: At this test EMBED tag doesn't contains height attribute, so default value should be returned. Comments: Test ID: basic/api/PlugletTagInfo2_getHeight_1 Test Directory: PlugletTagInfo2_getHeight_1 Recent files: PlugletTagInfo2_getHeight_0.java PlugletTagInfo2_getHeight_Iterator.java Arguments: none Check result: At this test tag EMBED has height attribute and it value transfered to pluglet via JavaScript.Then this value compared with returned by getHeight and if they equals then test PASSED Comments: 5.9 Tests for method getTagText of PlugletTagInfo2 interface. Method description: This method used to access full html tag text Method's state: doesn't work Test ID: basic/api/PlugletTagInfo2_getTagText Test Directory: PlugletTagInfo2_getTagText Recent files: PlugletTagInfo2_getTagText_0.java PlugletTagInfo2_getTagText_Iterator.java Arguments: none Check result: Not implemented. Possible a good way to check result is JavaScript. Comments: 5.10 Tests for method getTagType of PlugletTagInfo2 interface. Method description: Returns the type of HTML tag used to instantiate this pluglet Method's state: work Test ID: basic/api/PlugletTagInfo2_getTagType Test Directory: PlugletTagInfo2_getTagType Recent files: PlugletTagInfo2_getTagType_0.java PlugletTagInfo2_getTagType_Iterator.java Arguments: none Check result: At this test EMBED tag used to instantiate pluglet.The type of tag transfered to pluglet via JavaScript and then compared with returned by getTagType.If they equals then test PASSED. Comments: Test ID: basic/api/PlugletTagInfo2_getTagType_1 Test Directory: PlugletTagInfo2_getTagType_1 Recent files: PlugletTagInfo2_getTagType_0.java PlugletTagInfo2_getTagType_Iterator.java Arguments: none Check result: At this test OBJECT tag used to instantiate pluglet.The type of tag transfered to pluglet via JavaScript and then compared with returned by getTagType.If they equals then test PASSED. Comments: 5.11 Tests for method getUniqueID of PlugletTagInfo2 interface. Method description: This method returns unique ID of current document with this pluglet. Method's state: work Test ID: basic/api/PlugletTagInfo2_getUniqueID Test Directory: PlugletTagInfo2_getUniqueID Recent files: PlugletTagInfo2_getUniqueID_0.java PlugletTagInfo2_getUniqueID_Iterator.java and IDPluglet pluglet. Arguments: none Check result: 3 IDPluglet used to check results.All pluglets call getUniqueID method and transfer returned value to test pluglet.Test pluglet compare values and if they are equals then test PASSED. Comments: 5.12 Tests for method getWidth of PlugletTagInfo2 interface. Method description: Returns the value of width attribute of HTML tag used to instantiate this pluglet Method's state: work Test ID: basic/api/PlugletTagInfo2_getWidth Test Directory: PlugletTagInfo2_getWidth Recent files: PlugletTagInfo2_getWidth_0.java PlugletTagInfo2_getWidth_Iterator.java Arguments: none Check result: At this test EMBED tag hasn't width attribute. The default value of width attribute transfered to pluglet via JavaScript and then compared with returned by getWidth.If they equals then test PASSED. Comments: Test ID: basic/api/PlugletTagInfo2_getWidth_1 Test Directory: PlugletTagInfo2_getWidth_1 Recent files: PlugletTagInfo2_getWidth_0.java PlugletTagInfo2_getWidth_Iterator.java Arguments: none Check result: At this test EMBED tag used has width attribute. The value of width attribute transfered to pluglet via JavaScript and then compared with returned by getWidth.If they equals then test PASSED. Comments: