148 lines
6.4 KiB
Plaintext
148 lines
6.4 KiB
Plaintext
Interfaces, that can be quered from browser control:
|
|
webclient.BrowserControlCanvas
|
|
webclient.CurrentPage
|
|
webclient.EventRegistration
|
|
webclient.History
|
|
webclient.Navigation
|
|
webclient.WindowControl
|
|
|
|
Next interfaces skipped, because they are not implemented now(04/26/2000):
|
|
|
|
webclient.cache.NetDataCacheManager <SKIP> Not implemethed
|
|
webclient.Preferences <SKIP> Not implemethed
|
|
webclient.Print <SKIP> Not implemethed
|
|
webclient.ExtendedEventRegistration <SKIP> Not implemethed
|
|
|
|
|
|
org.mozilla.webclient.BrowserControlCanvas
|
|
Method: public void addNotify()
|
|
- 1 test, just for invoke and not crash
|
|
Method: public org.mozilla.webclient.BrowserControl getWebShell()
|
|
- 1 test: just for invoke and compare returned BrowserControl with original ?
|
|
Method: public void setBounds(Rectangle)
|
|
- 2 tests: null and well constructed rectangle
|
|
Method: public void setBounds(int_int_int_int)
|
|
- 12 tests: Integer.MIN_VALUE,Integer.MAX_VALUE,0 on each parameters,when other parameters good
|
|
- 3 tests: correct formed rectangle, all coords 0, and inverted rectangle(Xleft >Xright)
|
|
|
|
Non-public methods doesn't accesible for API's end-user, so will not be tested there
|
|
Method: non-public java.awt.Point getEventCoordsLocalToWindow(MouseEvent)
|
|
Method: non-public java.awt.Rectangle getWindowBounds()
|
|
Method: non-public java.awt.Rectangle getBoundsRelativeToWindow()
|
|
Method: non-public void initialize(BrowserControl)
|
|
Method: non-public int getWindow(DrawingSurfaceInfo)
|
|
|
|
Interface: org.mozilla.webclient.CurrentPage
|
|
Method: public void copyCurrentSelectionToSystemClipboard()
|
|
- 2 tests: without selection, with selection and compare with clipboard(when possible) ?
|
|
Method: public void findInPage(String pattern, boolean forward,boolean matchcase)
|
|
- 3 tests: null,empty anf correct string
|
|
- 8 tests: find (backward,forward)x(match,unmatch case)x(exist and unexist string)
|
|
|
|
Method: public void findNextInPage(boolean forward)
|
|
- 3 tests: find forward,backward and without previous find
|
|
Method: public java.lang.String getCurrentURL()
|
|
- 2 tests: during loading URL and during fully loaded URL
|
|
Method: public java.lang.String getSource()
|
|
- 1 tests: with correct page
|
|
Method: public [B getSourceBytes()
|
|
- 1 tests: with correct page(Possible test on different languages ?)
|
|
Method: public void resetFind()
|
|
- 2 tests: without previous find, with correct find
|
|
Method: public void selectAll()
|
|
- 1 tests: with correct page
|
|
Comments:
|
|
Possible we should add 1 tests on each method, when no pages loaded
|
|
|
|
|
|
Interface: org.mozilla.webclient.EventRegistration
|
|
Method: public void addDocumentLoadListener(DocumentLoadListener)
|
|
3 tests: null,correct DocumentLoadListener and already registered DocumentLoadListener
|
|
1 test: Several(2 - 3) different correct DocumentLoadListeners
|
|
Method: public void removeDocumentLoadListener(DocumentLoadListener)
|
|
3 tests: null,registered DocumentLoadListener and non-registered DocumentLoadListener
|
|
|
|
|
|
Interface: org.mozilla.webclient.History
|
|
Method: public void back()
|
|
2 tests: When previous page exists and when unexist
|
|
Method: public boolean canBack()
|
|
2 tests: When previous page exists and when unexist
|
|
Method: public [Lorg.mozilla.webclient.HistoryEntry; getBackList()
|
|
3 tests: For 0,1,3 previous pages
|
|
Method: public void clearHistory()
|
|
2 tests: For empty and nonempty history
|
|
Method: public void forward()
|
|
2 tests: When next page exists and when unexist
|
|
Method: public boolean canForward()
|
|
2 tests: When next page exists and when unexist
|
|
Method: public [Lorg.mozilla.webclient.HistoryEntry; getForwardList()
|
|
3 tests: For 0,1,3 next pages
|
|
Method: public [Lorg.mozilla.webclient.HistoryEntry; getHistory()
|
|
2 test: only with current page and with several pages (3-4),
|
|
possible add 2 tests when current page first and last
|
|
Method: public org.mozilla.webclient.HistoryEntry getHistoryEntry(int)
|
|
4 tests: Integer.MIN_VALUE,Integer.MAX_VALUE,0,legal value
|
|
Method: public int getCurrentHistoryIndex()
|
|
3 tests: when current page last, first, and in the middle of the history
|
|
Method: public void setCurrentHistoryIndex(int)
|
|
5 tests: Integer.MIN_VALUE,Integer.MAX_VALUE,0,legal value,current index
|
|
Method: public int getHistoryLength()
|
|
1 test: just get HistoryLength
|
|
Method: public java.lang.String getURLForIndex(int)
|
|
5 tests: Integer.MIN_VALUE,Integer.MAX_VALUE, first and last
|
|
|
|
Comment:
|
|
1. Also one test opn each method can be added for situations, when history is empty
|
|
2. Should be modeled situation, when history has several branches, for example
|
|
|
|
<Start URL> - < URL 1 > - < URL 2 > (do back here to URL 1)
|
|
|
|
|
<URL 3>
|
|
We should verify, that URL 2 correctly removed from history
|
|
|
|
|
|
Interface: org.mozilla.webclient.Navigation
|
|
Method: public void stop()
|
|
3 tests: When loading in progress, when url loaded, when no URLs loaded at ALL
|
|
Method: public void refresh(long)
|
|
3 tests: When loading in progress, when url loaded, when no URLs loaded at ALL
|
|
X test: tests on parameter values(at least Integer.MIN_VALUE,Integer.MAX_VALUE,0)
|
|
Method: public void loadURL(String)
|
|
2 tests: empty and null string
|
|
3 tests: When loading in progress, when url loaded, when no URLs loaded at ALL
|
|
4 test: ftp://, http://, file://, bad protocol
|
|
|
|
|
|
Interface: org.mozilla.webclient.WindowControl
|
|
Method: public void setBounds(Rectangle)
|
|
- 2 tests: null and well constructed rectangle
|
|
Method: public void createWindow(int,Rectangle)
|
|
- 3 tests: Integer.MIN_VALUE,Integer.MAX_VALUE,0
|
|
- 2 tests: with valid int use null and well constructed rectangle
|
|
Method: public int getNativeWebShell()
|
|
- 1 test: just call
|
|
Method: public void moveWindowTo(int_int)
|
|
- 6 tests: Integer.MIN_VALUE,Integer.MAX_VALUE,0 for each parameter when other parameter is good
|
|
- 2 tests: move to good coordinates and move out of screen bounds
|
|
Method: public void removeFocus()
|
|
- 1 test: just call
|
|
Method: public void repaint(boolean)
|
|
- 2 tests: forse repaint and not
|
|
Method: public void setVisible(boolean)
|
|
- 2 tests: with false and with true
|
|
Method: public void setFocus()
|
|
- 1 test: just call
|
|
|
|
Interface: org.mozilla.webclient.cache.NetDataCacheManager <SKIP>
|
|
|
|
Interface: org.mozilla.webclient.Preferences <SKIP>
|
|
|
|
Interface: org.mozilla.webclient.Print <SKIP>
|
|
|
|
Interface: org.mozilla.webclient.ExtendedEventRegistration <SKIP>
|
|
|
|
|
|
|
|
|