edburns%acm.org 256c970b1c Automated test cases.
git-svn-id: svn://10.0.0.236/trunk@84595 18797224-902f-48f8-a5cc-f745e15eee43
2001-01-08 21:27:40 +00:00

158 lines
12 KiB
HTML

<html>
<head>
<title>
Description of tests on History interface
</title>
</head>
<body bgcolor=white>
<P align=left>This document contains a simple preliminary description of
testcases on History interface of Webclient API.</P>
<UL>
<LI><A href=#back>Tests on <B>back</B> method</A>
<LI><A href=#canBack>Tests on <B>canBack</B> method</A>
<LI><A href=#canForward>Tests on <B>canForward</B> method</A>
<LI><A href=#clearHistory>Tests on <B>clearHistory</B> method</A>
<LI><A href=#forward>Tests on <B>forward</B> method</A>
<LI><A href=#getBackList>Tests on <B>getBackList</B> method</A>
<LI><A href=#getCurrentHistoryIndex>Tests on <B>getCurrentHistoryIndex</B> method</A>
<LI><A href=#getForwardList>Tests on <B>getForwardList</B> method</A>
<LI><A href=#getHistory>Tests on <B>getHistory</B> method</A>
<LI><A href=#getHistoryEntry>Tests on <B>getHistoryEntry</B> method</A>
<LI><A href=#getHistoryLength>Tests on <B>getHistoryLength</B> method</A>
<LI><A href=#getURLForIndex>Tests on <B>getURLForIndex</B> method</A>
<LI><A href=#setCurrentHistoryIndex>Tests on <B>setCurrentHistoryIndex</B> method</A>
</UL>
<A name=back>
<H2>1. Tests on back method.</H2>
<table border=1>
<tr><td>Test ID</td><td>Action</td><td>Expected Result</td>
<tr><td>basic/api/History_back_1:0</td><td>Method back() invoked when backList is empty</td><td>Mozilla doesn't crashes and no page loads</td></tr>
<tr><td>basic/api/History_back_1:1</td><td>Method back() invoked when backList is not empty</td><td>Mozilla doesn't crashes and load previous page</td></tr>
<tr><td>basic/api/History_back_2:0</td><td>Method back() invoked when no URL loaded</td><td>Mozilla doesn't crashes and no page loads</td></tr>
</table>
<A name=canBack>
<H2>2. Tests on canBack method.</H2>
<table border=1>
<tr><td>Test ID</td><td>Action</td><td>Expected Result</td>
<tr><td>basic/api/History_canBack_1:0</td><td>Method canBack() invoked when backList is not empty</td><td>Mozilla doesn't crashes and canBack return true</td></tr>
<tr><td>basic/api/History_canBack_1:1</td><td>Method canBack() invoked when backList is empty</td><td>Mozilla doesn't crashes and canBack return false</td></tr>
<tr><td>basic/api/History_canBack_2:0</td><td>Method canBack() invoked when no URL loaded</td><td>Mozilla doesn't crashes and canBack return false</td></tr>
</table>
<A name=canForward>
<H2>3. Tests on canForward method.</H2>
<table border=1>
<tr><td>Test ID</td><td>Action</td><td>Expected Result</td>
<tr><td>basic/api/History_canForward_1:0</td><td>Method canForward() invoked when forwardList is not empty</td><td>Mozilla doesn't crashes and canForward return true</td></tr>
<tr><td>basic/api/History_canForward_1:1</td><td>Method canForward() invoked when forwardList is empty</td><td>Mozilla doesn't crashes and canForward return false</td></tr>
<tr><td>basic/api/History_canForward_2:0</td><td>Method canForward() invoked when no URL loaded</td><td>Mozilla doesn't crashes and canForward return false</td></tr>
</table>
<A name=clearHistory>
<H2>4. Tests on clearHistory method.</H2>
<table border=1>
<tr><td>Test ID</td><td>Action</td><td>Expected Result</td>
<tr><td>basic/api/History_clearHistory_1:0</td><td>Method clearHistory() invoked when no URL loaded</td><td>Mozilla doesn't crashes and history.length return true</td></tr>
<tr><td>basic/api/History_clearHistory_2:0</td><td>Method clearHistory() invoked when some URL's are loaded</td><td>Mozilla doesn't crashes and clearHistory return false</td></tr>
</table>
<A name=forward>
<H2>5. Tests on forward method.</H2>
<table border=1>
<tr><td>Test ID</td><td>Action</td><td>Expected Result</td>
<tr><td>basic/api/History_forward_1:0</td><td>Method forward() invoked when forwardList is empty</td><td>Mozilla doesn't crashes and forward do nothing and do not thrown any exception</td></tr>
<tr><td>basic/api/History_forward_1:1</td><td>Method forward() invoked when forwardList is not empty</td><td>Mozilla doesn't crashes and forward load next URL</td></tr>
<tr><td>basic/api/History_forward_2:0</td><td>Method forward() invoked when no URL loaded</td><td>Mozilla doesn't crashes and forward do nothing and do not thrown any exception</td></tr>
</table>
<A name=getBackList>
<H2>6. Tests on getBackList method.</H2>
<table border=1>
<tr><td>Test ID</td><td>Action</td><td>Expected Result</td>
<tr><td>basic/api/History_getBackList:0</td><td>Method getBackList() invoked when backList is empty</td><td>Mozilla doesn't crashes and getBackList return null</td></tr>
<tr><td>basic/api/History_getBackList:1</td><td>Method getBackList() invoked when backList is not empty</td><td>Mozilla doesn't crashes and getBackList return correct backList</td></tr>
<tr><td>basic/api/History_getBackList:2</td><td>Method getBackList() invoked when no URL loaded</td><td>Mozilla doesn't crashes and getBackList return null</td></tr>
<tr><td>basic/api/History_getBackList:3</td><td>Method getBackList() invoked when some URL's are loaded and neither method called before</td><td>Mozilla doesn't crashes and getBackList return correct BackList</td></tr>
</table>
<A name=getCurrentHistoryIndex>
<H2>7. Tests on getCurrentHistoryIndex method.</H2>
<table border=1>
<tr><td>Test ID</td><td>Action</td><td>Expected Result</td>
<tr><td>basic/api/History_getCurrentHistoryIndex:0</td><td>Method getCurrentHistoryIndex() invoked when current URL is the first in history</td><td>Mozilla doesn't crashes and getCurrentHistoryIndex return 0</td></tr>
<tr><td>basic/api/History_getCurrentHistoryIndex:1</td><td>Method getCurrentHistoryIndex() invoked when current URL is the last in history</td><td>Mozilla doesn't crashes and getCurrentHistoryIndex return correct length of history</td></tr>
<tr><td>basic/api/History_getCurrentHistoryIndex:2</td><td>Method getCurrentHistoryIndex() invoked when current URL is in the middle of history</td><td>Mozilla doesn't crashes and getCurrentHistoryIndex return correct index</td></tr>
<tr><td>basic/api/History_getCurrentHistoryIndex:3</td><td>Method getCurrentHistoryIndex() invoked when current URL is the last in history and neither method called before</td><td>Mozilla doesn't crashes and getCurrentHistoryIndex return correct index</td></tr>
</table>
<A name=getForwardList>
<H2>8. Tests on getForwardList method.</H2>
<table border=1>
<tr><td>Test ID</td><td>Action</td><td>Expected Result</td>
<tr><td>basic/api/History_getForwardList:0</td><td>Method getForwardList() invoked when forwardList is empty (the last page is loaded)</td><td>Mozilla doesn't crashes and getForwardList return empty array</td></tr>
<tr><td>basic/api/History_getForwardList:1</td><td>Method getForwardList() invoked when forwardList is equal all history</td><td>Mozilla doesn't crashes and getForwardList return correct forwardList</td></tr>
<tr><td>basic/api/History_getForwardList:2</td><td>Method getForwardList() invoked when forwardList is a part of history</td><td>Mozilla doesn't crashes and getForwardList return correct forwardList</td></tr>
<tr><td>basic/api/History_getForwardList:3</td><td>Method getForwardList() invoked when forwardList is empty (the last page is loaded) and neither method called before</td><td>Mozilla doesn't crashes and getForwardList return correct forwardList</td></tr>
</table>
<A name=getHistory>
<H2>9. Tests on getHistory method.</H2>
<table border=1>
<tr><td>Test ID</td><td>Action</td><td>Expected Result</td>
<tr><td>basic/api/History_getHistory_1:0</td><td>Method getHistory() invoked when history contains only 1 html</td><td>Mozilla doesn't crashes and getHistory return araay with 1 element</td></tr>
<tr><td>basic/api/History_getHistory_2:0</td><td>Method getHistory() invoked when current page is the first in history</td><td>Mozilla doesn't crashes and getHistory return correct array</td></tr>
<tr><td>basic/api/History_getHistory_2:1</td><td>Method getHistory() invoked when current page in the middle of history</td><td>Mozilla doesn't crashes and getHistory return correct array</td></tr>
<tr><td>basic/api/History_getHistory_2:2</td><td>Method getHistory() invoked when current page in the end of history</td><td>Mozilla doesn't crashes and getHistory return correct array</td></tr>
</table>
<A name=getHistoryEntry>
<H2>10. Tests on getHistoryEntry method.</H2>
<table border=1>
<tr><td>Test ID</td><td>Action</td><td>Expected Result</td>
<tr><td>basic/api/History_getHistoryEntry:0</td><td>Method getHistoryEntry() invoked with arg = INTEGER.MAX_VALUE</td><td>Mozilla doesn't crashes and getHistoryEntry return null (or thrown Exception)</td></tr>
<tr><td>basic/api/History_getHistoryEntry:1</td><td>Method getHistoryEntry() invoked with arg = INTEGER.MIN_VALUE</td><td>Mozilla doesn't crashes and getHistoryEntry return null (or thrown Exception)</td></tr>
<tr><td>basic/api/History_getHistoryEntry:2</td><td>Method getHistoryEntry() invoked with arg = 0</td><td>Mozilla doesn't crashes and getHistoryEntry return a first entry of history</td></tr>
<tr><td>basic/api/History_getHistoryEntry:3</td><td>Method getHistoryEntry() invoked with arg equals a history.length</td><td>Mozilla doesn't crashes and getHistoryEntry return last entry of history</td></tr>
</table>
<A name=getHistoryLength>
<H2>11. Tests on getHistoryLength method.</H2>
<table border=1>
<tr><td>Test ID</td><td>Action</td><td>Expected Result</td>
<tr><td>basic/api/History_getHistoryLength_1:0</td><td>Method getHistoryLength() invoked with some loaded pages</td><td>Mozilla doesn't crashes and getHistoryLength return correct value</td></tr>
<tr><td>basic/api/History_getHistoryLength_2:0</td><td>Method getHistoryLength() invoked when none URL's loaded</td><td>Mozilla doesn't crashes and getHistoryLength return 0</td></tr>
</table>
<A name=getURLForIndex>
<H2>12. Tests on getURLForIndex method.</H2>
<table border=1>
<tr><td>Test ID</td><td>Action</td><td>Expected Result</td>
<tr><td>basic/api/History_getURLForIndex:0</td><td>Method getURLForIndex() invoked with arg = INTEGER.MAX_VALUE</td><td>Mozilla doesn't crashes and getURLForIndex return null (or thrown Exception)</td></tr>
<tr><td>basic/api/History_getURLForIndex:1</td><td>Method getURLForIndex() invoked with arg = INTEGER.MIN_VALUE</td><td>Mozilla doesn't crashes and getURLForIndex return null (or thrown Exception)</td></tr>
<tr><td>basic/api/History_getURLForIndex:2</td><td>Method getURLForIndex() invoked with arg = 0</td><td>Mozilla doesn't crashes and getURLForIndex return a first URL of history</td></tr>
<tr><td>basic/api/History_getURLForIndex:3</td><td>Method getURLForIndex() invoked with arg equals a history.length</td><td>Mozilla doesn't crashes and getURLForIndex return last URL of history</td></tr>
</table>
<A name=setCurrentHistoryIndex>
<H2>13. Tests on setCurrentHistoryIndex method.</H2>
<table border=1>
<tr><td>Test ID</td><td>Action</td><td>Expected Result</td>
<tr><td>basic/api/History_setCurrentHistoryIndex_1:0</td><td>Method setCurrentHistoryIndex() invoked with arg = INTEGER.MAX_VALUE</td><td>Mozilla doesn't crashes and setCurrentHistoryIndex do not load any URL (or thrown Exception)</td></tr>
<tr><td>basic/api/History_setCurrentHistoryIndex_1:1</td><td>Method setCurrentHistoryIndex() invoked with arg = INTEGER.MIN_VALUE</td><td>Mozilla doesn't crashes and setCurrentHistoryIndex do not load any URL (or thrown Exception)</td></tr>
<tr><td>basic/api/History_setCurrentHistoryIndex_1:2</td><td>Method setCurrentHistoryIndex() invoked with arg = 0</td><td>Mozilla doesn't crashes and setCurrentHistoryIndex load a first URL of history</td></tr>
<tr><td>basic/api/History_setCurrentHistoryIndex_1:3</td><td>Method setCurrentHistoryIndex() invoked with 0<arg<history.length</td><td>Mozilla doesn't crashes and setCurrentHistoryIndex load correct URL </td></tr>
<tr><td>basic/api/History_setCurrentHistoryIndex_1:4</td><td>Method setCurrentHistoryIndex() invoked with arg = history.length</td><td>Mozilla doesn't crashes and setCurrentHistoryIndex load last URL of history</td></tr>
<tr><td>basic/api/History_setCurrentHistoryIndex_2:0</td><td>Method setCurrentHistoryIndex() invoked with history = null </td><td>Mozilla doesn't crashes and setCurrentHistoryIndex do not load any URL</td></tr>
</table>
</body>
</html>