Commit e36b05ae authored by Pier Angelo Vendrame's avatar Pier Angelo Vendrame 🎃
Browse files

fixup! BB 40925: Implemented the Security Level component

BB 44153: Add search engine customization tests.
parent c987d3b1
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
/* Any copyright is dedicated to the Public Domain.
 * http://creativecommons.org/publicdomain/zero/1.0/ */

/**
 * This tests that we use the HTML version of DuckDuckGo when in the safest
 * security level.
 */

"use strict";

const expectedURLs = {
  ddg: "https://html.duckduckgo.com/html?q=test",
};

add_task(async function test_securityLevel() {
  await Services.search.init();
  for (const [id, url] of Object.entries(expectedURLs)) {
    const engine = Services.search.getEngineById(id);
    const foundUrl = engine.getSubmission("test").uri.spec;
    Assert.equal(foundUrl, url, `${engine.name} is in HTML mode.`);
  }
});
+3 −0
Original line number Diff line number Diff line
@@ -217,6 +217,9 @@ skip-if = [

["test_searchUrlDomain.js"]

["test_security_level.js"]
prefs = ["browser.security_level.security_slider=1"]

["test_selectedEngine.js"]

["test_sendSubmissionURL.js"]