blob: 3ceb7e36f62d1d4fdb57d389979a415198b98a9d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
This tests XMLSerializer.serializeToString() throwing exception when node value is invalid and passing otherwise.
1. Verifying XMLSerializer.serializeToString() should THROW exception with no argument
Exception thrown = [TypeError: Failed to execute 'serializeToString' on 'XMLSerializer': 1 argument required, but only 0 present.]
PASS
2. Verifying XMLSerializer.serializeToString() should THROW exception with argument null
Exception thrown = [TypeError: Failed to execute 'serializeToString' on 'XMLSerializer': parameter 1 is not of type 'Node'.]
PASS
3. Verifying XMLSerializer.serializeToString() should THROW exception with argument undefined
Exception thrown = [TypeError: Failed to execute 'serializeToString' on 'XMLSerializer': parameter 1 is not of type 'Node'.]
PASS
4. Verifying XMLSerializer.serializeToString() should THROW exception with argument <html><title>Hello World</title></html>
Exception thrown = [TypeError: Failed to execute 'serializeToString' on 'XMLSerializer': parameter 1 is not of type 'Node'.]
PASS
5. Verifying XMLSerializer.serializeToString() should THROW exception with argument [object HTMLCollection]
Exception thrown = [TypeError: Failed to execute 'serializeToString' on 'XMLSerializer': parameter 1 is not of type 'Node'.]
PASS
6. Verifying XMLSerializer.serializeToString() should NOT-THROW exception with argument [object HTMLDocument]
PASS
7. Verifying XMLSerializer.serializeToString() should NOT-THROW exception with argument [object HTMLHtmlElement]
PASS
8. Verifying XMLSerializer.serializeToString() should NOT-THROW exception with argument [object HTMLHtmlElement]
PASS
9. Verifying XMLSerializer.serializeToString() should NOT-THROW exception with argument [object HTMLDivElement]
PASS
10. Verifying XMLSerializer.serializeToString() should NOT-THROW exception with argument [object HTMLHeadingElement]
PASS
11. Verifying XMLSerializer.serializeToString() should NOT-THROW exception with argument [object HTMLUnknownElement]
PASS
12. Verifying XMLSerializer.serializeToString() should NOT-THROW exception with argument [object HTMLDocument]
PASS
13. Verifying XMLSerializer.serializeToString() should NOT-THROW exception with argument [object HTMLHtmlElement]
PASS
14. Verifying XMLSerializer.serializeToString() should NOT-THROW exception with argument [object XMLDocument]
PASS
15. Verifying XMLSerializer.serializeToString() should NOT-THROW exception with argument [object Element]
PASS
|