Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(742)

Side by Side Diff: LayoutTests/fast/dom/private_script_unittest.html

Issue 413393003: Blink-in-JS: Implement internal APIs exposed only to private scripts (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/fast/dom/private_script_unittest-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 shouldBeEqualToString('privateScriptTest.stringAttribute', 'foo'); 59 shouldBeEqualToString('privateScriptTest.stringAttribute', 'foo');
60 shouldBe('privateScriptTest.nodeAttribute', 'null'); 60 shouldBe('privateScriptTest.nodeAttribute', 'null');
61 var node8 = privateScriptTest.createElement(document); 61 var node8 = privateScriptTest.createElement(document);
62 privateScriptTest.nodeAttribute = node8; 62 privateScriptTest.nodeAttribute = node8;
63 shouldBe('privateScriptTest.nodeAttribute', 'node8'); 63 shouldBe('privateScriptTest.nodeAttribute', 'node8');
64 64
65 shouldThrow('privateScriptTest.nodeAttributeThrowsIndexSizeError'); 65 shouldThrow('privateScriptTest.nodeAttributeThrowsIndexSizeError');
66 shouldThrow('privateScriptTest.nodeAttributeThrowsIndexSizeError = null'); 66 shouldThrow('privateScriptTest.nodeAttributeThrowsIndexSizeError = null');
67 shouldThrow('privateScriptTest.voidMethodThrowsSyntaxError()'); 67 shouldThrow('privateScriptTest.voidMethodThrowsSyntaxError()');
68 68
69 shouldBe('privateScriptTest.addIntegerImplementedInCPP(111, 222)', '333');
70 shouldBeEqualToString('privateScriptTest.stringAttributeImplementedInCPP', 'unde fined');
71 privateScriptTest.stringAttributeImplementedInCPP = "foo";
72 shouldBeEqualToString('privateScriptTest.stringAttributeImplementedInCPP', 'foo' );
73
74 // These tests are important. [OnlyExposedToPrivateScript] APIs should not be vi sible to user's JavaScript.
75 shouldBeUndefined('privateScriptTest.addIntegerImplementedInCPPForPrivateScriptO nly');
76 shouldBeUndefined('privateScriptTest.stringAttributeImplementedInCPPForPrivateSc riptOnly');
77
69 </script> 78 </script>
70 </body> 79 </body>
71 </html> 80 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/private_script_unittest-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698