Esempio n. 1
0
  @Override
  protected void check(SSPHandler sspHandler, TestSolutionHandler testSolutionHandler) {
    super.check(sspHandler, testSolutionHandler);
    ElementChecker ec;
    if (!notIdentifiedTableWithoutDataTableMarkup.isEmpty()) {
      ec =
          new ElementPresenceChecker(
              // nmi when element is found
              TestSolution.NEED_MORE_INFO,
              // na when element is not found
              TestSolution.NOT_APPLICABLE,
              // message associated when element is found
              CHECK_TABLE_IS_PRESENTATION_TABLE_MSG,
              // no message created when child element is not found
              null);
      ec.check(sspHandler, notIdentifiedTableWithoutDataTableMarkup, testSolutionHandler);
    }
    if (!presentationTableWithoutDataTableMarkup.isEmpty()) {
      ec =
          new ElementPresenceChecker(
              // passed when element is foundexit

              TestSolution.PASSED,
              // na when element is not found
              TestSolution.NOT_APPLICABLE,
              // message associated when element is found
              null,
              // no message created when child element is not found
              null);
      ec.check(sspHandler, presentationTableWithoutDataTableMarkup, testSolutionHandler);
    }
  }
Esempio n. 2
0
 @Override
 protected void check(SSPHandler sspHandler, TestSolutionHandler testSolutionHandler) {
   ElementChecker ec =
       new ElementPresenceChecker(
           TestSolution.FAILED, TestSolution.PASSED, FLASH_CONTENT_DETECTED_MSG, null);
   ec.check(sspHandler, decidableElements, testSolutionHandler);
   ec =
       new ElementPresenceChecker(
           TestSolution.NEED_MORE_INFO,
           TestSolution.PASSED,
           SUSPECTED_FLASH_CONTENT_DETECTED_MSG,
           null);
   ec.check(sspHandler, notDecidableElements, testSolutionHandler);
   if (testSolutionHandler.getTestSolution().equals(TestSolution.PASSED)) {
     testSolutionHandler.addTestSolution(checkSourceCode(sspHandler));
   }
 }
Esempio n. 3
0
 /**
  * @param sspHandler
  * @param el
  * @param linkText
  * @return
  */
 private TestSolution testTitleAttributeLink(SSPHandler sspHandler, Element el, String linkText) {
   // if the current has no title or has an empty title or has a title
   // content identical to the link text, returns not applicable.
   if (!el.hasAttr(TITLE_ATTR)) {
     return TestSolution.NOT_APPLICABLE;
   }
   String attrValue = el.attr(TITLE_ATTR);
   if (StringUtils.isBlank(attrValue)) {
     return TestSolution.NOT_APPLICABLE;
   }
   if (StringUtils.equalsIgnoreCase(attrValue, linkText)) {
     return TestSolution.NOT_APPLICABLE;
   }
   ElementHandler<Element> elHandler = new ElementHandlerImpl(el);
   TestSolutionHandler tsHandler = new TestSolutionHandlerImpl();
   titlePertinenceElementChecker.check(sspHandler, elHandler, tsHandler);
   return tsHandler.getTestSolution();
 }