| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../../resources/js-test.js"></script> | 4 <script src="../../resources/js-test.js"></script> |
| 5 </head> | 5 </head> |
| 6 <body> | 6 <body> |
| 7 <script> | 7 <script> |
| 8 description('Unittests for private scripts.'); | 8 description('Unittests for private scripts.'); |
| 9 if (!internals || !internals.privateScriptTest()) | 9 if (!internals || !internals.privateScriptTest()) |
| 10 debug('This test needs window.internals.privateScriptTest().'); | 10 debug('This test needs window.internals.privateScriptTest().'); |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 | 74 |
| 75 shouldBe('privateScriptTest.addIntegerImplementedInCPP(111, 222)', '333'); | 75 shouldBe('privateScriptTest.addIntegerImplementedInCPP(111, 222)', '333'); |
| 76 shouldBeEqualToString('privateScriptTest.stringAttributeImplementedInCPP', 'unde
fined'); | 76 shouldBeEqualToString('privateScriptTest.stringAttributeImplementedInCPP', 'unde
fined'); |
| 77 privateScriptTest.stringAttributeImplementedInCPP = "foo"; | 77 privateScriptTest.stringAttributeImplementedInCPP = "foo"; |
| 78 shouldBeEqualToString('privateScriptTest.stringAttributeImplementedInCPP', 'foo'
); | 78 shouldBeEqualToString('privateScriptTest.stringAttributeImplementedInCPP', 'foo'
); |
| 79 | 79 |
| 80 // These tests are important. [OnlyExposedToPrivateScript] APIs should not be vi
sible to user's JavaScript. | 80 // These tests are important. [OnlyExposedToPrivateScript] APIs should not be vi
sible to user's JavaScript. |
| 81 shouldBeUndefined('privateScriptTest.addIntegerImplementedInCPPForPrivateScriptO
nly'); | 81 shouldBeUndefined('privateScriptTest.addIntegerImplementedInCPPForPrivateScriptO
nly'); |
| 82 shouldBeUndefined('privateScriptTest.stringAttributeImplementedInCPPForPrivateSc
riptOnly'); | 82 shouldBeUndefined('privateScriptTest.stringAttributeImplementedInCPPForPrivateSc
riptOnly'); |
| 83 | 83 |
| 84 shouldBe('privateScriptTest.addIntegerInPartial(111, 222)', '333'); |
| 85 shouldBe('privateScriptTest.addInteger2InPartial(111, 222)', '333'); |
| 86 privateScriptTest.stringAttributeInPartial = "foo"; |
| 87 shouldBeEqualToString('privateScriptTest.stringAttributeInPartial', 'foo'); |
| 88 |
| 84 </script> | 89 </script> |
| 85 </body> | 90 </body> |
| 86 </html> | 91 </html> |
| OLD | NEW |