author Tim Huang <>
Tue, 06 Jun 2017 17:14:55 +0800
changeset 364971 5131e38858f91107d1d198ffd8a4187be1ed1a87
child 366639 1cd9e27f0fa16bd65edc431ca37bbcd5ad72b3bd
permissions -rw-r--r--
Bug 1333651 - Part 3: Add a test case to verify that Navigator object has been spoofed/disabled correctly when 'privacy.resistFingerprinting' is true. r=arthuredelstein,Ehsan This patch adds a brower chrome test to verify the navigator object when 'privacy.resistFingerprinting' is true. This test will also test worker navigator to check that whether it has been correctly spoofed/disabled. MozReview-Commit-ID: 17FvdlmLMjP

<title>Test page for navigator object</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"></meta>
  // This page will collect information from the navigator object and store
  // the result at a paragraph in the page.
  function collect() {
    let result = {};

    result["appCodeName"] = navigator.appCodeName;
    result["appName"] = navigator.appName;
    result["appVersion"] = navigator.appVersion;
    result["platform"] = navigator.platform;
    result["userAgent"] = navigator.userAgent;
    result["product"] = navigator.product;
    result["productSub"] = navigator.productSub;
    result["vendor"] = navigator.vendor;
    result["vendorSub"] = navigator.vendorSub;
    result["mimeTypesLength"] = navigator.mimeTypes.length;
    result["pluginsLength"] = navigator.plugins.length;
    result["oscpu"] = navigator.oscpu;
    result["buildID"] = navigator.buildID;
    result["hardwareConcurrency"] = navigator.hardwareConcurrency;

    document.getElementById("result").innerHTML = JSON.stringify(result);
<body onload="collect();">
<p id="result"></p>