Platform-DOM-Tests.st 478 B

1234567891011121314151617
  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. ! !