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

Side by Side Diff: LayoutTests/plugins/get-targeted-javascript-url.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 <!DOCTYPE html>
2 <html>
3 <head>
4 <script>
5 addEventListener('load', startTest, false);
6 var noReturnValueFunctionCalled = false;
7 var returnValueFunctionCalled = false;
8 var noReturnValueReason = -1;
9 var returnValueReason = -1;
10
11 function startTest() {
12 if (window.testRunner) {
13 testRunner.dumpAsText();
14 testRunner.waitUntilDone();
15 }
16
17 var plugin = document.getElementsByTagName('embed')[0];
18 plugin.getURLNotify('javascript:noReturnValueFunction()', '_self', ' noReturnValueURLNotify');
19 plugin.getURLNotify('javascript:returnValueFunction()', '_self', 're turnValueURLNotify');
20
21 // The javascript: URLs will be evaluated asynchronously. Since we d on't expect a
22 // callback when the evaluation is complete, we have to use a lame t imeout to give
23 // the callback time to be evaluated.
24 setTimeout(finishTest, 250);
25 }
26
27 function finishTest() {
28 if (!noReturnValueFunctionCalled)
29 log('FAIL: noReturnValueFunction was not called');
30 else if (noReturnValueReason !== -1 && noReturnValueReason !== 0)
31 log('FAIL (no return value): NPP_URLNotify called with unexpecte d reason ' + noReturnValueReason);
32 else
33 log('SUCCESS (no return value): NPP_URLNotify was not called, or was called with a reason of NPRES_DONE');
34
35 if (!returnValueFunctionCalled)
36 log('FAIL: returnValueFunction was not called');
37 else if (returnValueReason !== -1 && returnValueReason !== 0)
38 log('FAIL (return value): NPP_URLNotify called with unexpected r eason ' + returnValueReason);
39 else
40 log('SUCCESS (return value): NPP_URLNotify was not called, or wa s called with a reason of NPRES_DONE');
41
42 if (window.testRunner)
43 testRunner.notifyDone();
44 }
45
46 function log(msg) {
47 document.getElementById('log').appendChild(document.createTextNode(m sg + '\n'));
48 }
49
50 function noReturnValueFunction() {
51 noReturnValueFunctionCalled = true;
52 }
53
54 function returnValueFunction() {
55 returnValueFunctionCalled = true;
56 return 'foo';
57 }
58
59 function noReturnValueURLNotify(reason) {
60 noReturnValueReason = reason;
61 }
62
63 function returnValueURLNotify(reason) {
64 returnValueReason = reason;
65 }
66 </script>
67 </head>
68 <body>
69 <embed type="application/x-webkit-test-netscape"></embed>
70 <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=60568">Bug 6056 8: REGRESSION (WebKit2): Flash plugin doesn't appear on a hanes.com page</a>.</p >
71 <pre id="log"></pre>
72 </body>
73 </html>
OLDNEW
« no previous file with comments | « LayoutTests/plugins/get-javascript-url-expected.txt ('k') | LayoutTests/plugins/get-targeted-javascript-url-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698