forked from mozilla/gecko-dev
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge mozilla-central to mozilla-inbound
- Loading branch information
Showing
147 changed files
with
3,298 additions
and
933 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
browser/components/extensions/test/browser/browser_ext_identity_indication.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */ | ||
/* vim: set sts=2 sw=2 et tw=80: */ | ||
"use strict"; | ||
|
||
function confirmDefaults() { | ||
let identityIconURL = getComputedStyle(document.getElementById("identity-icon")).listStyleImage; | ||
is(identityIconURL, "url(\"chrome://browser/skin/identity-icon.svg#normal\")", "Identity icon should be the default identity icon"); | ||
|
||
let connectionIconURL = getComputedStyle(document.getElementById("connection-icon")).listStyleImage; | ||
is(connectionIconURL, "none", "Connection icon should not be displayed"); | ||
|
||
let extensionIconURL = getComputedStyle(document.getElementById("extension-icon")).listStyleImage; | ||
is(extensionIconURL, "none", "Extension icon should not be displayed"); | ||
|
||
let label = document.getElementById("identity-icon-label").value; | ||
is(label, "", "No label should be used before the extension is started"); | ||
} | ||
|
||
function confirmExtensionPage() { | ||
let identityIcon = getComputedStyle(document.getElementById("identity-icon")).listStyleImage; | ||
is(identityIcon, "url(\"chrome://browser/skin/identity-icon.svg#normal\")", "Identity icon should be the default identity icon"); | ||
|
||
let connectionIconURL = getComputedStyle(document.getElementById("connection-icon")).listStyleImage; | ||
is(connectionIconURL, "none", "Connection icon should not be displayed"); | ||
|
||
let extensionIconEl = document.getElementById("extension-icon"); | ||
let extensionIconURL = getComputedStyle(extensionIconEl).listStyleImage; | ||
is(extensionIconURL, "url(\"chrome://browser/skin/controlcenter/extension.svg\")", "Extension icon should be the default extension icon"); | ||
let tooltip = extensionIconEl.tooltipText; | ||
is(tooltip, "Loaded by extension: Test Extension", "The correct tooltip should be used"); | ||
|
||
let label = document.getElementById("identity-icon-label").value; | ||
is(label, "Extension (Test Extension)", "The correct label should be used"); | ||
} | ||
|
||
add_task(async function testIdentityIndication() { | ||
let extension = ExtensionTestUtils.loadExtension({ | ||
background() { | ||
browser.test.sendMessage("url", browser.extension.getURL("icon.png")); | ||
}, | ||
manifest: { | ||
name: "Test Extension", | ||
}, | ||
files: { | ||
"icon.png": "", | ||
}, | ||
}); | ||
|
||
await extension.startup(); | ||
|
||
confirmDefaults(); | ||
|
||
let url = await extension.awaitMessage("url"); | ||
await BrowserTestUtils.withNewTab({gBrowser, url}, async function() { | ||
confirmExtensionPage(); | ||
}); | ||
|
||
await extension.unload(); | ||
|
||
confirmDefaults(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.