• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

hazendaz / httpunit / 755

14 Feb 2026 07:14PM UTC coverage: 80.526%. Remained the same
755

push

github

hazendaz
[ci] Fix badge

3213 of 4105 branches covered (78.27%)

Branch coverage included in aggregate %.

8245 of 10124 relevant lines covered (81.44%)

0.81 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

55.56
/src/main/java/com/meterware/httpunit/AppletStubImpl.java
1
/*
2
 * SPDX-License-Identifier: MIT
3
 * See LICENSE file for details.
4
 *
5
 * Copyright 2000-2026 Russell Gold
6
 * Copyright 2021-2000 hazendaz
7
 */
8
package com.meterware.httpunit;
9

10
import java.applet.AppletContext;
11
import java.applet.AppletStub;
12
import java.net.URL;
13

14
/**
15
 * The Class AppletStubImpl.
16
 */
17
class AppletStubImpl implements AppletStub {
18

19
    /** The web applet. */
20
    private WebApplet _webApplet;
21

22
    /**
23
     * Instantiates a new applet stub impl.
24
     *
25
     * @param webApplet
26
     *            the web applet
27
     */
28
    AppletStubImpl(WebApplet webApplet) {
1✔
29
        _webApplet = webApplet;
1✔
30
    }
1✔
31

32
    /**
33
     * Determines if the applet is active. An applet is active just before its <code>start</code> method is called. It
34
     * becomes inactive just before its <code>stop</code> method is called.
35
     *
36
     * @return <code>true</code> if the applet is active; <code>false</code> otherwise.
37
     */
38
    @Override
39
    public boolean isActive() {
40
        return false;
×
41
    }
42

43
    /**
44
     * Returns an absolute URL naming the directory of the document in which the applet is embedded. For example,
45
     * suppose an applet is contained within the document: <blockquote>
46
     *
47
     * <pre>
48
     *    http://java.sun.com/products/jdk/1.2/index.html
49
     * </pre>
50
     *
51
     * </blockquote> The document base is: <blockquote>
52
     *
53
     * <pre>
54
     *    http://java.sun.com/products/jdk/1.2/
55
     * </pre>
56
     *
57
     * </blockquote>
58
     *
59
     * @return the {@link URL} of the document that contains this applet.
60
     *
61
     * @see AppletStub#getCodeBase()
62
     */
63
    @Override
64
    public URL getDocumentBase() {
65
        return null;
×
66
    }
67

68
    /**
69
     * Gets the base URL.
70
     *
71
     * @return the <code>URL</code> of the applet.
72
     */
73
    @Override
74
    public URL getCodeBase() {
75
        return null;
×
76
    }
77

78
    /**
79
     * Returns the value of the named parameter in the HTML tag. For example, if an applet is specified as <blockquote>
80
     *
81
     * <pre>
82
     * &lt;applet code="Clock" width=50 height=50&gt;
83
     * &lt;param name=Color value="blue"&gt;
84
     * &lt;/applet&gt;
85
     * </pre>
86
     *
87
     * </blockquote>
88
     * <p>
89
     * then a call to <code>getParameter("Color")</code> returns the value <code>"blue"</code>.
90
     *
91
     * @param name
92
     *            a parameter name.
93
     *
94
     * @return the value of the named parameter, or <tt>null</tt> if not set.
95
     */
96
    @Override
97
    public String getParameter(String name) {
98
        return _webApplet.getParameter(name);
1✔
99
    }
100

101
    /**
102
     * Gets a handler to the applet's context.
103
     *
104
     * @return the applet's context.
105
     */
106
    @Override
107
    public AppletContext getAppletContext() {
108
        return new AppletContextImpl(_webApplet);
1✔
109
    }
110

111
    /**
112
     * Called when the applet wants to be resized.
113
     *
114
     * @param width
115
     *            the new requested width for the applet.
116
     * @param height
117
     *            the new requested height for the applet.
118
     */
119
    @Override
120
    public void appletResize(int width, int height) {
121
    }
×
122
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc