com.google.caja.plugin
Class ExpressionSanitizerTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by com.google.caja.util.CajaTestCase
              extended by com.google.caja.plugin.ExpressionSanitizerTest
All Implemented Interfaces:
junit.framework.Test

public class ExpressionSanitizerTest
extends CajaTestCase

Author:
mikesamuel@gmail.com (Mike Samuel)

Field Summary
 
Fields inherited from class com.google.caja.util.CajaTestCase
is, mc, mq, SEED
 
Constructor Summary
ExpressionSanitizerTest()
           
 
Method Summary
private  void assertSanitize(java.lang.String input, java.lang.String golden)
           
private  ExpressionSanitizerCaja newPassThruSanitizer()
           
protected  void setUp()
           
protected  void tearDown()
           
 void testBasicRewriting()
           
 void testNonAsciiIsDetected()
           
 void testNoSpuriousRewriteErrorFound()
           
 void testRewriteErrorIsDetected()
           
 
Methods inherited from class com.google.caja.util.CajaTestCase
assertArrayEquals, assertCloneable, assertDeepEquals, assertMessage, assertMessage, assertMessagesLessSevereThan, assertNoErrors, assertNoMessage, assertNoWarnings, checkHeadless, css, css, cssDecls, cssDecls, dataFromResource, formatShort, fromResource, fromResource, fromString, fromString, fromString, html, htmlFragment, js, js, js, jsExpr, jsExpr, markup, markupFragment, minify, plain, quasi, render, render, renderProgram, runTest, xml, xmlFragment
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExpressionSanitizerTest

public ExpressionSanitizerTest()
Method Detail

setUp

protected void setUp()
              throws java.lang.Exception
Overrides:
setUp in class CajaTestCase
Throws:
java.lang.Exception

tearDown

protected void tearDown()
                 throws java.lang.Exception
Overrides:
tearDown in class CajaTestCase
Throws:
java.lang.Exception

testBasicRewriting

public final void testBasicRewriting()
                              throws java.lang.Exception
Throws:
java.lang.Exception

testNoSpuriousRewriteErrorFound

public final void testNoSpuriousRewriteErrorFound()

testRewriteErrorIsDetected

public final void testRewriteErrorIsDetected()

testNonAsciiIsDetected

public final void testNonAsciiIsDetected()

newPassThruSanitizer

private ExpressionSanitizerCaja newPassThruSanitizer()

assertSanitize

private void assertSanitize(java.lang.String input,
                            java.lang.String golden)
                     throws java.lang.Exception
Throws:
java.lang.Exception


Copyright (C) 2008 Google Inc.
Licensed under the Apache License, Version 2.0