com.gargoylesoftware.htmlunit.html
Class HtmlCheckBoxInputTest

java.lang.Object
  extended by com.gargoylesoftware.htmlunit.WebTestCase
      extended by com.gargoylesoftware.htmlunit.SimpleWebTestCase
          extended by com.gargoylesoftware.htmlunit.html.HtmlCheckBoxInputTest

public class HtmlCheckBoxInputTest
extends SimpleWebTestCase

Tests for HtmlCheckBoxInput.

Version:
$Revision: 7931 $
Author:
Mike Bresnahan, Marc Guillemot, Ahmed Ashour

Field Summary
 
Fields inherited from class com.gargoylesoftware.htmlunit.WebTestCase
DEFAULT_WAIT_TIME, DEFAULT_WAIT_TIME_FACTOR, FLAG_ALL_BROWSERS, generateTest_browserVersion_, GEOLOCATION_IGNORE, JAVASCRIPT_MIME_TYPE, LINE_SEPARATOR, PORT, PORT2, PORT3, PROPERTY_GENERATE_TESTPAGES, SOCKS_PROXY_HOST, SOCKS_PROXY_PORT, SOCKS_PROXY_SKIP, URL_CROSS_ORIGIN, URL_CROSS_ORIGIN_BASE, URL_CROSS_ORIGIN2, URL_FIRST, URL_SECOND, URL_THIRD
 
Constructor Summary
HtmlCheckBoxInputTest()
           
 
Method Summary
 void asText()
          Verifies that a asText() returns "checked" or "unchecked" according to the state of the checkbox.
 void defaultState()
          Verifies that a HtmlCheckBox is unchecked by default.
 void onClick()
          Tests onclick event handlers.
 void onClickThatSubmitsForm()
          Tests onclick event handlers.
 void preventDefault()
           
 
Methods inherited from class com.gargoylesoftware.htmlunit.SimpleWebTestCase
createNewWebClient, getJavaScriptThreads, getMockConnection, getWebClient, getWebClientWithMockWebConnection, loadPage, loadPage, loadPage, loadPage, loadPage, loadPage, loadPage, loadPageWithAlerts, loadPageWithAlerts, loadUrl, readJSThreadsBeforeTest, releaseResources, testHTMLFile
 
Methods inherited from class com.gargoylesoftware.htmlunit.WebTestCase
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertNull, assertTrue, assertTrue, clone, createTestPageForRealBrowserIfNeeded, createTestPageForRealBrowserIfNeeded, expandExpectedAlertsVariables, generateTestForWebDriver, getBrowserVersion, getDefaultUrl, getExpectedAlerts, getFileAsStream, getFileObject, getMockWebConnection, getModifiedContent, loadExpectation, setExpectedAlerts, setGenerateTest_notYetImplemented, setMockWebConnection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HtmlCheckBoxInputTest

public HtmlCheckBoxInputTest()
Method Detail

defaultState

public void defaultState()
                  throws Exception
Verifies that a HtmlCheckBox is unchecked by default. The onClick tests make this assumption.

Throws:
Exception - if the test fails

onClick

public void onClick()
             throws Exception
Tests onclick event handlers. Given an onclick handler that does not cause the form to submit, this test verifies that HtmlCheckBix.click():

Throws:
Exception - if the test fails

onClickThatSubmitsForm

public void onClickThatSubmitsForm()
                            throws Exception
Tests onclick event handlers. Given an onclick handler that causes the form to submit, this test verifies that HtmlCheckBix.click():

Throws:
Exception - if the test fails

asText

public void asText()
            throws Exception
Verifies that a asText() returns "checked" or "unchecked" according to the state of the checkbox.

Throws:
Exception - if the test fails

preventDefault

public void preventDefault()
                    throws Exception
Throws:
Exception - if an error occurs


Copyright © 2002-2013 Gargoyle Software Inc.. All Rights Reserved.