1
0

Platform-DOM-Tests.st 478 B

12345678910111213141516
  1. Smalltalk createPackage: 'Platform-DOM-Tests'!
  2. TestCase subclass: #PlatformDomTest
  3. instanceVariableNames: 'fixtureDiv'
  4. package: 'Platform-DOM-Tests'!
  5. !PlatformDomTest methodsFor: 'testing'!
  6. testEntityConversion
  7. PlatformDom isFeasible ifTrue: [ self assert: '©' htmlTextContent equals: '©' ]
  8. !
  9. testTextContentDoesNotRunScript
  10. PlatformDom isFeasible ifTrue: [
  11. self shouldnt: [ '<script>throw new Error("Intentional")</script>' htmlTextContent ] raise: Error ]
  12. ! !