• 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

85.71
/src/main/java/com/meterware/httpunit/FrameSelector.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
/**
11
 * An immutable class which describes the position of a frame in the window hierarchy.
12
 **/
13
public class FrameSelector {
14

15
    /** The top frame. */
16
    public static FrameSelector TOP_FRAME = new FrameSelector(WebRequest.TOP_FRAME);
1✔
17

18
    /** The new frame. */
19
    static FrameSelector NEW_FRAME = new FrameSelector(WebRequest.TOP_FRAME);
1✔
20

21
    /** The name. */
22
    private String _name;
23

24
    /** The window. */
25
    private WebWindow _window;
26

27
    /** The parent. */
28
    private FrameSelector _parent;
29

30
    /**
31
     * Instantiates a new frame selector.
32
     */
33
    FrameSelector() {
1✔
34
        _name = super.toString();
1✔
35
    }
1✔
36

37
    /**
38
     * Instantiates a new frame selector.
39
     *
40
     * @param name
41
     *            the name
42
     */
43
    FrameSelector(String name) {
1✔
44
        _name = name;
1✔
45
    }
1✔
46

47
    /**
48
     * Instantiates a new frame selector.
49
     *
50
     * @param name
51
     *            the name
52
     * @param parent
53
     *            the parent
54
     */
55
    FrameSelector(String name, FrameSelector parent) {
1✔
56
        _name = name;
1✔
57
        _parent = parent;
1✔
58
    }
1✔
59

60
    /**
61
     * Gets the name.
62
     *
63
     * @return the name
64
     */
65
    String getName() {
66
        return _name;
1✔
67
    }
68

69
    /**
70
     * Gets the parent.
71
     *
72
     * @return the parent
73
     */
74
    FrameSelector getParent() {
75
        return _parent;
1✔
76
    }
77

78
    @Override
79
    public String toString() {
80
        return "Frame Selector: [ " + getFullName() + " ]";
×
81
    }
82

83
    /**
84
     * Gets the full name.
85
     *
86
     * @return the full name
87
     */
88
    private String getFullName() {
89
        return _name + (_parent == null ? "" : " in " + _parent.getFullName());
×
90
    }
91

92
    /**
93
     * Gets the window.
94
     *
95
     * @return the window
96
     */
97
    WebWindow getWindow() {
98
        return _window != null ? _window : _parent == null ? null : _parent.getWindow();
1✔
99
    }
100

101
    /**
102
     * New top frame.
103
     *
104
     * @param window
105
     *            the window
106
     *
107
     * @return the frame selector
108
     */
109
    static FrameSelector newTopFrame(WebWindow window) {
110
        return new FrameSelector(WebRequest.TOP_FRAME, window);
1✔
111
    }
112

113
    /**
114
     * Instantiates a new frame selector.
115
     *
116
     * @param name
117
     *            the name
118
     * @param window
119
     *            the window
120
     */
121
    private FrameSelector(String name, WebWindow window) {
1✔
122
        _name = name;
1✔
123
        _window = window;
1✔
124
    }
1✔
125

126
}
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