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

Side by Side Diff: LayoutTests/plugins/npruntime/invoke-browserfuncs.html

Issue 1319473007: Delete a bunch of NPAPI layout tests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 5 years, 3 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
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script>
4 function doTest()
5 {
6 if (window.testRunner)
7 testRunner.dumpAsText();
8
9 var plugin = document.getElementById("testPlugin");
10 var console = document.getElementById("console");
11
12 var o = { internalFunction : Object, doStuff: function() {return 20;}, strin gProperty : 'str', nullProperty : null, undefinedProperty : undefined };
13
14 function report(property, result, expected) {
15 if (result !== expected) {
16 console.innerHTML += "FAILURE: " + property + "<br/>";
17 } else {
18 console.innerHTML += "SUCCESS: " + property + "<br/>";
19 }
20 }
21
22 function shouldBeFunction(property, expected) {
23 report(property, plugin.testHasMethod(o, property), expected);
24 }
25
26 function shouldBeProperty(property, expected) {
27 report(property, plugin.testHasProperty(o, property), expected);
28 }
29
30 /* test hasmethod */
31 console.innerHTML += "Testing hasmethod<br />";
32 shouldBeFunction("internalFunction", true);
33 shouldBeFunction("doStuff", true);
34 shouldBeFunction("undefinedProperty", false);
35
36 /* test hasproperty */
37 console.innerHTML += "<br />Testing hasproperty<br />";
38 shouldBeProperty("internalFunction", true);
39 shouldBeProperty("doStuff", true);
40 shouldBeProperty("stringProperty", true);
41 shouldBeProperty("nullProperty", true);
42 shouldBeProperty("undefinedProperty", true);
43 shouldBeProperty("notDefinedProperty", false);
44 }
45 </script>
46 </head>
47 <body onload="doTest();">
48 <p>Test if the plugin can properly invoke the browserfuncs</p>
49 <embed id="testPlugin" type="application/x-webkit-test-netscape"></embed>
50 <div id="console"></div>
51 </body>
52 </html>
OLDNEW
« no previous file with comments | « LayoutTests/plugins/npruntime/invoke.html ('k') | LayoutTests/plugins/npruntime/invoke-browserfuncs-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698