Coverage Report

Created: 2025-12-18 07:52

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/serenity/Userland/Libraries/LibWeb/HTML/NavigatorID.h
Line
Count
Source
1
/*
2
 * Copyright (c) 2022, Andrew Kaster <akaster@serenityos.org>
3
 *
4
 * SPDX-License-Identifier: BSD-2-Clause
5
 */
6
7
#pragma once
8
9
#include <AK/String.h>
10
11
namespace Web::HTML {
12
13
class NavigatorIDMixin {
14
public:
15
    // WARNING: Any information in this API that varies from user to user can be used to profile the user. In fact, if
16
    // enough such information is available, a user can actually be uniquely identified. For this reason, user agent
17
    // implementers are strongly urged to include as little information in this API as possible.
18
19
    // https://html.spec.whatwg.org/multipage/system-state.html#dom-navigator-appcodename
20
0
    String app_code_name() const { return "Mozilla"_string; }
21
22
    // https://html.spec.whatwg.org/multipage/system-state.html#dom-navigator-appcodename
23
0
    String app_name() const { return "Netscape"_string; }
24
25
    // https://html.spec.whatwg.org/multipage/system-state.html#dom-navigator-appversion
26
    String app_version() const;
27
28
    // https://html.spec.whatwg.org/multipage/system-state.html#dom-navigator-platform
29
    String platform() const;
30
31
    // https://html.spec.whatwg.org/multipage/system-state.html#dom-navigator-product
32
0
    String product() const { return "Gecko"_string; }
33
34
    // https://html.spec.whatwg.org/multipage/system-state.html#dom-navigator-productsub
35
    String product_sub() const;
36
37
    // https://html.spec.whatwg.org/multipage/system-state.html#dom-navigator-useragent
38
    String user_agent() const;
39
40
    // https://html.spec.whatwg.org/multipage/system-state.html#dom-navigator-vendor
41
    String vendor() const;
42
43
    // https://html.spec.whatwg.org/multipage/system-state.html#dom-navigator-vendorsub
44
0
    String vendor_sub() const { return String {}; }
45
46
    // FIXME: If the navigator compatibility mode is Gecko, then the user agent must also support the following partial interface:
47
    //       bool taint_enabled()
48
    //       ByteString oscpu()
49
};
50
51
}