Java Doc for JavaScriptEngineTest.java in  » Testing » htmlunit » com » gargoylesoftware » htmlunit » javascript » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Testing » htmlunit » com.gargoylesoftware.htmlunit.javascript 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.gargoylesoftware.htmlunit.WebTestCase
   com.gargoylesoftware.htmlunit.javascript.JavaScriptEngineTest

JavaScriptEngineTest
public class JavaScriptEngineTest extends WebTestCase (Code)
Tests for the JavaScriptEngine .
version:
   $Revision: 2132 $
author:
   Mike Bowler
author:
   Noboru Sinohara
author:
   Darrell DeBoer
author:
   Ben Curren
author:
   Marc Guillemot
author:
   Chris Erskine
author:
   David K. Taylor
author:
   Ahmed Ashour



Constructor Summary
public  JavaScriptEngineTest(String name)
    

Method Summary
public  voidtestActiveXObjectNoMap()
    
public  voidtestActiveXObjectWithMap()
     Test that Java objects placed in the active x map can be instantiated and used within javascript using the IE specific ActiveXObject constructor.
public  voidtestAlert()
    
public  voidtestComment()
    
public  voidtestCommentNoDoubleSlashFF()
    
public  voidtestCommentNoDoubleSlashIE()
    
public  voidtestCompiledScriptCached()
     Test that compiled script are cached.
public  voidtestECMAReservedKeywords()
     Test ECMA reserved keywords...
public  voidtestEventHandlerWithComment()
    
public  voidtestExternalScript()
    
public  voidtestExternalScriptEncoding()
    
public  voidtestExternalScriptWithNewLineBeforeClosingScriptTag()
    
public  voidtestFunctionDefinedInExternalFile_CalledFromInlineScript()
    
public  voidtestFunctionDefinedInSameFile()
     Test case for bug 707134.
public  voidtestJavaScriptEngineCallsForVariableAccess()
     Test that the javascript engine gets called correctly for variable access.
public  voidtestJavaScriptUrl()
    
public  voidtestJavaScriptWrappedInHtmlComments()
    
public  voidtestJavaScriptWrappedInHtmlComments2()
    
public  voidtestJavaScriptWrappedInHtmlComments_allOnOneLine()
    
public  voidtestJavaScriptWrappedInHtmlComments_commentNotClosed()
    
public  voidtestJavaScriptWrappedInHtmlComments_commentOnOpeningLine()
    
public  voidtestOnloadJavascriptFunction()
    
public  voidtestPrototypeScope()
     Test that prototype changes are made in the right scope.
public  voidtestReferencingVariablesFromOneScriptToAnother_Regression()
    
public  voidtestRegExpSupport()
    
public  voidtestScopeInInactivePage()
     If a reference has been hold on a page and the page is not anymore the one contained in "its" window, javascript execution should work...
public  voidtestScopeOfNestedNewFunction()
    
public  voidtestScopeOfNewFunction()
    
public  voidtestScopeOfNewFunctionCalledFormOtherWindow()
    
public  voidtestScriptErrorContainsPageUrl()
    
public  voidtestScriptErrorIsolated()
     Check that wrong javascript just causes its context to fail but not the whole page.
public  voidtestScriptTags_AllLocalContent()
     Test that code in script tags is executed on page load.
public  voidtestSetInputValue()
     Try to set the value of a text input field.
public  voidtestSetJavascriptEnabled_false()
    
public  voidtestSetValuesThatAreNotStrings()
     Set value on input expects a string.
public  voidtestStringPrimitivePrototypeScopeRhino()
     Test for Rhino bug https://bugzilla.mozilla.org/show_bug.cgi?id=374918 Once this bug is fixed, StringPrimitivePrototypeBugFixer can be completely removed as well as this unit test.
public  voidtestThisDotInOnClick()
     When using the syntax this.something in an onclick handler, "this" must represent the object being clicked, not the window.
public  voidtestTimeout()
    


Constructor Detail
JavaScriptEngineTest
public JavaScriptEngineTest(String name)(Code)
Create an instance
Parameters:
  name - The name of the test




Method Detail
testActiveXObjectNoMap
public void testActiveXObjectNoMap() throws Exception(Code)
ActiveX related exceptions that do not require a map
throws:
  Exception - If the test fails



testActiveXObjectWithMap
public void testActiveXObjectWithMap() throws Exception(Code)
Test that Java objects placed in the active x map can be instantiated and used within javascript using the IE specific ActiveXObject constructor.
throws:
  Exception - If the test fails



testAlert
public void testAlert() throws Exception(Code)

throws:
  Exception - if the test fails



testComment
public void testComment() throws Exception(Code)

throws:
  Exception - If the test fails



testCommentNoDoubleSlashFF
public void testCommentNoDoubleSlashFF() throws Exception(Code)

throws:
  Exception - If the test fails



testCommentNoDoubleSlashIE
public void testCommentNoDoubleSlashIE() throws Exception(Code)

throws:
  Exception - If the test fails



testCompiledScriptCached
public void testCompiledScriptCached() throws Exception(Code)
Test that compiled script are cached.
throws:
  Exception - if the test fails



testECMAReservedKeywords
public void testECMAReservedKeywords() throws Exception(Code)
Test ECMA reserved keywords... that are accepted by "normal" browsers
throws:
  Exception - if the test fails



testEventHandlerWithComment
public void testEventHandlerWithComment() throws Exception(Code)

throws:
  Exception - if the test fails



testExternalScript
public void testExternalScript() throws Exception(Code)

throws:
  Exception - if the test fails



testExternalScriptEncoding
public void testExternalScriptEncoding() throws Exception(Code)

throws:
  Exception - if the test fails



testExternalScriptWithNewLineBeforeClosingScriptTag
public void testExternalScriptWithNewLineBeforeClosingScriptTag() throws Exception(Code)
Regression test for https://sourceforge.net/tracker/?func=detail&atid=448266&aid=1552746&group_id=47038
throws:
  Exception - if the test fails



testFunctionDefinedInExternalFile_CalledFromInlineScript
public void testFunctionDefinedInExternalFile_CalledFromInlineScript() throws Exception(Code)

throws:
  Exception - if the test fails



testFunctionDefinedInSameFile
public void testFunctionDefinedInSameFile() throws Exception(Code)
Test case for bug 707134. Currently I am unable to reproduce the problem.
throws:
  Exception - if the test fails



testJavaScriptEngineCallsForVariableAccess
public void testJavaScriptEngineCallsForVariableAccess() throws Exception(Code)
Test that the javascript engine gets called correctly for variable access.
throws:
  Exception - If the test fails



testJavaScriptUrl
public void testJavaScriptUrl() throws Exception(Code)

throws:
  Exception - if the test fails



testJavaScriptWrappedInHtmlComments
public void testJavaScriptWrappedInHtmlComments() throws Exception(Code)

throws:
  Exception - if the test fails



testJavaScriptWrappedInHtmlComments2
public void testJavaScriptWrappedInHtmlComments2() throws Exception(Code)

throws:
  Exception - if the test fails



testJavaScriptWrappedInHtmlComments_allOnOneLine
public void testJavaScriptWrappedInHtmlComments_allOnOneLine() throws Exception(Code)

throws:
  Exception - If the test fails.



testJavaScriptWrappedInHtmlComments_commentNotClosed
public void testJavaScriptWrappedInHtmlComments_commentNotClosed() throws Exception(Code)
Regression test for bug 1714762
throws:
  Exception - if the test fails



testJavaScriptWrappedInHtmlComments_commentOnOpeningLine
public void testJavaScriptWrappedInHtmlComments_commentOnOpeningLine() throws Exception(Code)

throws:
  Exception - if the test fails



testOnloadJavascriptFunction
public void testOnloadJavascriptFunction() throws Exception(Code)
Regression test for bug https://sourceforge.net/tracker/?func=detail&atid=448266&aid=1609944&group_id=47038
throws:
  Exception - if the test fails



testPrototypeScope
public void testPrototypeScope() throws Exception(Code)
Test that prototype changes are made in the right scope. Problem reported by Bruce Faulnker in the dev mailing list. This is due to a Rhino bug: https://bugzilla.mozilla.org/show_bug.cgi?id=374918
throws:
  Exception - If something goes wrong.



testReferencingVariablesFromOneScriptToAnother_Regression
public void testReferencingVariablesFromOneScriptToAnother_Regression() throws Exception(Code)

throws:
  Exception - if the test fails



testRegExpSupport
public void testRegExpSupport() throws Exception(Code)

throws:
  Exception - If the test fails



testScopeInInactivePage
public void testScopeInInactivePage() throws Exception(Code)
If a reference has been hold on a page and the page is not anymore the one contained in "its" window, javascript execution should work... a bit
throws:
  Exception - if the test fails



testScopeOfNestedNewFunction
public void testScopeOfNestedNewFunction() throws Exception(Code)

throws:
  Exception - if the test fails



testScopeOfNewFunction
public void testScopeOfNewFunction() throws Exception(Code)
Checks that a dynamically compiled function works in the scope of its birth
throws:
  Exception - if the test fails



testScopeOfNewFunctionCalledFormOtherWindow
public void testScopeOfNewFunctionCalledFormOtherWindow() throws Exception(Code)
Checks that a dynamically compiled function works in the scope of its birth and not the other window
throws:
  Exception - if the test fails



testScriptErrorContainsPageUrl
public void testScriptErrorContainsPageUrl() throws Exception(Code)
Test that the url of the page containing the script is contained in the exception's message
throws:
  Exception - if the test fails



testScriptErrorIsolated
public void testScriptErrorIsolated() throws Exception(Code)
Check that wrong javascript just causes its context to fail but not the whole page.
throws:
  Exception - If something goes wrong.



testScriptTags_AllLocalContent
public void testScriptTags_AllLocalContent() throws Exception(Code)
Test that code in script tags is executed on page load. Try different combinations of the script tag except for the case where a remote javascript page is loaded. That one will be tested separately.
throws:
  Exception - If something goes wrong.



testSetInputValue
public void testSetInputValue() throws Exception(Code)
Try to set the value of a text input field.
throws:
  Exception - if the test fails



testSetJavascriptEnabled_false
public void testSetJavascriptEnabled_false() throws Exception(Code)

throws:
  Exception - if the test fails



testSetValuesThatAreNotStrings
public void testSetValuesThatAreNotStrings() throws Exception(Code)
Set value on input expects a string. If you pass in a value that isn't a string this used to blow up.
throws:
  Exception - if the test fails



testStringPrimitivePrototypeScopeRhino
public void testStringPrimitivePrototypeScopeRhino()(Code)
Test for Rhino bug https://bugzilla.mozilla.org/show_bug.cgi?id=374918 Once this bug is fixed, StringPrimitivePrototypeBugFixer can be completely removed as well as this unit test. Correct string primitive prototype resolution within HtmlUnit is tested by JavaScriptEngineTest.testPrototypeScope()



testThisDotInOnClick
public void testThisDotInOnClick() throws Exception(Code)
When using the syntax this.something in an onclick handler, "this" must represent the object being clicked, not the window. Regression test.
throws:
  Exception - if the test fails



testTimeout
public void testTimeout() throws Exception(Code)

throws:
  Exception - If the test fails



Fields inherited from com.gargoylesoftware.htmlunit.WebTestCase
final public static String PROPERTY_GENERATE_TESTPAGES(Code)(Java Doc)
final public static URL URL_FIRST(Code)(Java Doc)
final public static URL URL_GARGOYLE(Code)(Java Doc)
final public static URL URL_SECOND(Code)(Java Doc)
final public static URL URL_THIRD(Code)(Java Doc)

Methods inherited from com.gargoylesoftware.htmlunit.WebTestCase
protected void assertEquals(URL expectedUrl, URL actualUrl)(Code)(Java Doc)
protected void assertEquals(String message, URL expectedUrl, URL actualUrl)(Code)(Java Doc)
protected void assertEquals(String expectedUrl, URL actualUrl)(Code)(Java Doc)
protected void assertEquals(String[] expected, List actual)(Code)(Java Doc)
protected void assertEquals(String message, String[] expected, List actual)(Code)(Java Doc)
protected void assertEquals(String message, String expectedUrl, URL actualUrl)(Code)(Java Doc)
public static void assertNull(Object object)(Code)(Java Doc)
protected void createTestPageForRealBrowserIfNeeded(String content, String[] expectedAlerts) throws IOException(Code)(Java Doc)
protected void createTestPageForRealBrowserIfNeeded(String content, List expectedAlerts) throws IOException(Code)(Java Doc)
public static InputStream getFileAsStream(String fileName) throws FileNotFoundException(Code)(Java Doc)
public static File getFileObject(String fileName) throws FileNotFoundException(Code)(Java Doc)
final protected Log getLog()(Code)(Java Doc)
final protected static MockWebConnection getMockConnection(HtmlPage page)(Code)(Java Doc)
final protected static HtmlPage loadPage(String html) throws Exception(Code)(Java Doc)
final protected static HtmlPage loadPage(BrowserVersion browserVersion, String html, List collectedAlerts) throws Exception(Code)(Java Doc)
final protected static HtmlPage loadPage(String html, List collectedAlerts) throws Exception(Code)(Java Doc)
final protected static HtmlPage loadPage(String html, List collectedAlerts, URL url) throws Exception(Code)(Java Doc)
final protected static HtmlPage loadPage(BrowserVersion browserVersion, String html, List collectedAlerts, URL url) throws Exception(Code)(Java Doc)
final protected static HtmlPage loadUrl(String url) throws Exception(Code)(Java Doc)
protected boolean notYetImplemented()(Code)(Java Doc)
protected void testHTMLFile(String fileName) throws Exception(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.