| OLD | NEW |
| 1 description("Tests whether immutable properties can not be modified."); | 1 description("Tests whether immutable properties can not be modified."); |
| 2 | 2 |
| 3 var svgDoc = document.implementation.createDocument("http://www.w3.org/2000/svg"
, "svg", null); | 3 var svgDoc = document.implementation.createDocument("http://www.w3.org/2000/svg"
, "svg", null); |
| 4 | 4 |
| 5 // 'viewport' attribute is immutable (Spec: The object itself and its contents a
re both readonly.) | 5 // 'viewport' attribute is immutable (Spec: The object itself and its contents a
re both readonly.) |
| 6 var viewport = svgDoc.documentElement.viewport; | 6 var viewport = svgDoc.documentElement.viewport; |
| 7 | 7 |
| 8 shouldBe("viewport.x", "0"); | 8 shouldBe("viewport.x", "0"); |
| 9 viewport.x = 100; | 9 viewport.x = 100; |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 // 'previousScale' property | 23 // 'previousScale' property |
| 24 shouldBe("zoomEvent.previousScale", "0") | 24 shouldBe("zoomEvent.previousScale", "0") |
| 25 zoomEvent.previousScale = 200; | 25 zoomEvent.previousScale = 200; |
| 26 shouldBe("zoomEvent.previousScale", "0") | 26 shouldBe("zoomEvent.previousScale", "0") |
| 27 | 27 |
| 28 // 'previousTranslate' property | 28 // 'previousTranslate' property |
| 29 var previousTranslate = zoomEvent.previousTranslate; | 29 var previousTranslate = zoomEvent.previousTranslate; |
| 30 | 30 |
| 31 shouldBe("previousTranslate.x", "0"); | 31 shouldBe("previousTranslate.x", "0"); |
| 32 previousTranslate.x = 300; | 32 shouldThrow("previousTranslate.x = 300;"); |
| 33 | 33 |
| 34 shouldBe("previousTranslate.x", "300"); | |
| 35 shouldBe("zoomEvent.previousTranslate.x", "0"); | 34 shouldBe("zoomEvent.previousTranslate.x", "0"); |
| 36 | 35 |
| 37 // 'newScale' property | 36 // 'newScale' property |
| 38 shouldBe("zoomEvent.newScale", "0"); | 37 shouldBe("zoomEvent.newScale", "0"); |
| 39 zoomEvent.newScale = 200; | 38 shouldThrow("zoomEvent.newScale = 200;"); |
| 40 shouldBe("zoomEvent.newScale", "0"); | 39 shouldBe("zoomEvent.newScale", "0"); |
| 41 | 40 |
| 42 // 'newTranslate' property | 41 // 'newTranslate' property |
| 43 var newTranslate = zoomEvent.previousTranslate; | 42 var newTranslate = zoomEvent.newTranslate; |
| 44 | 43 |
| 45 shouldBe("newTranslate.x", "0"); | 44 shouldBe("newTranslate.x", "0"); |
| 46 newTranslate.x = 300; | 45 shouldThrow("newTranslate.x = 300;"); |
| 47 | 46 shouldBe("newTranslate.x", "0"); |
| 48 shouldBe("newTranslate.x", "300"); | |
| 49 shouldBe("zoomEvent.newTranslate.x", "0"); | |
| 50 | 47 |
| 51 var successfullyParsed = true; | 48 var successfullyParsed = true; |
| OLD | NEW |