зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1554294 - Adding in chrome as a supported scriptLoader IsInternalURIScheme and adding relative file paths to aboutlogins r=baku,jaws
Differential Revision: https://phabricator.services.mozilla.com/D34705 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
c5d1baba60
Коммит
7d7b9948a6
|
@ -2,7 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import {recordTelemetryEvent} from "chrome://browser/content/aboutlogins/aboutLoginsUtils.js";
|
||||
import {recordTelemetryEvent} from "aboutLoginsUtils.js";
|
||||
|
||||
let gElements = {};
|
||||
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import {recordTelemetryEvent} from "chrome://browser/content/aboutlogins/aboutLoginsUtils.js";
|
||||
import ReflectedFluentElement from "chrome://browser/content/aboutlogins/components/reflected-fluent-element.js";
|
||||
import {recordTelemetryEvent} from "../aboutLoginsUtils.js";
|
||||
import ReflectedFluentElement from "./reflected-fluent-element.js";
|
||||
|
||||
export default class CopyToClipboardButton extends ReflectedFluentElement {
|
||||
static get BUTTON_RESET_TIMEOUT() {
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import {recordTelemetryEvent} from "chrome://browser/content/aboutlogins/aboutLoginsUtils.js";
|
||||
import ReflectedFluentElement from "chrome://browser/content/aboutlogins/components/reflected-fluent-element.js";
|
||||
import {recordTelemetryEvent} from "../aboutLoginsUtils.js";
|
||||
import ReflectedFluentElement from "./reflected-fluent-element.js";
|
||||
|
||||
export default class LoginFilter extends ReflectedFluentElement {
|
||||
connectedCallback() {
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import {recordTelemetryEvent} from "chrome://browser/content/aboutlogins/aboutLoginsUtils.js";
|
||||
import ReflectedFluentElement from "chrome://browser/content/aboutlogins/components/reflected-fluent-element.js";
|
||||
import {recordTelemetryEvent} from "../aboutLoginsUtils.js";
|
||||
import ReflectedFluentElement from "./reflected-fluent-element.js";
|
||||
|
||||
export default class LoginItem extends ReflectedFluentElement {
|
||||
constructor() {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import {recordTelemetryEvent} from "chrome://browser/content/aboutlogins/aboutLoginsUtils.js";
|
||||
import {recordTelemetryEvent} from "../aboutLoginsUtils.js";
|
||||
|
||||
export default class LoginListItem extends HTMLElement {
|
||||
constructor(login) {
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import LoginListItem from "chrome://browser/content/aboutlogins/components/login-list-item.js";
|
||||
import ReflectedFluentElement from "chrome://browser/content/aboutlogins/components/reflected-fluent-element.js";
|
||||
import LoginListItem from "./login-list-item.js";
|
||||
import ReflectedFluentElement from "./reflected-fluent-element.js";
|
||||
|
||||
const collator = new Intl.Collator();
|
||||
const sortFnOptions = {
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import {recordTelemetryEvent} from "chrome://browser/content/aboutlogins/aboutLoginsUtils.js";
|
||||
import ReflectedFluentElement from "chrome://browser/content/aboutlogins/components/reflected-fluent-element.js";
|
||||
import {recordTelemetryEvent} from "../aboutLoginsUtils.js";
|
||||
import ReflectedFluentElement from "./reflected-fluent-element.js";
|
||||
|
||||
export default class ModalInput extends ReflectedFluentElement {
|
||||
static get LOCKED_PASSWORD_DISPLAY() {
|
||||
|
|
|
@ -1,15 +1,6 @@
|
|||
[DEFAULT]
|
||||
scheme = https
|
||||
support-files =
|
||||
../../content/aboutLogins.html
|
||||
../../content/aboutLoginsUtils.js
|
||||
../../content/components/login-filter.js
|
||||
../../content/components/login-item.js
|
||||
../../content/components/login-list.js
|
||||
../../content/components/login-list-item.js
|
||||
../../content/components/menu-button.js
|
||||
../../content/components/modal-input.js
|
||||
../../content/components/reflected-fluent-element.js
|
||||
aboutlogins_common.js
|
||||
|
||||
[test_login_filter.html]
|
||||
|
|
|
@ -8,8 +8,8 @@ Test the login-filter component
|
|||
<title>Test the login-filter component</title>
|
||||
<script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
|
||||
<script type="module" src="login-filter.js"></script>
|
||||
<script type="module" src="login-list.js"></script>
|
||||
<script type="module" src="chrome://browser/content/aboutlogins/components/login-filter.js"></script>
|
||||
<script type="module" src="chrome://browser/content/aboutlogins/components/login-list.js"></script>
|
||||
<script src="aboutlogins_common.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="/tests/SimpleTest/test.css"/>
|
||||
|
@ -18,7 +18,7 @@ Test the login-filter component
|
|||
<p id="display">
|
||||
</p>
|
||||
<div id="content" style="display: none">
|
||||
<iframe id="templateFrame" src="aboutLogins.html"
|
||||
<iframe id="templateFrame" src="chrome://browser/content/aboutlogins/aboutLogins.html"
|
||||
sandbox="allow-same-origin"></iframe>
|
||||
</div>
|
||||
<pre id="test">
|
||||
|
|
|
@ -8,8 +8,8 @@ Test the login-item component
|
|||
<title>Test the login-item component</title>
|
||||
<script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
|
||||
<script type="module" src="login-item.js"></script>
|
||||
<script type="module" src="modal-input.js"></script>
|
||||
<script type="module" src="chrome://browser/content/aboutlogins/components/login-item.js"></script>
|
||||
<script type="module" src="chrome://browser/content/aboutlogins/components/modal-input.js"></script>
|
||||
<script src="aboutlogins_common.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="/tests/SimpleTest/test.css"/>
|
||||
|
@ -18,7 +18,7 @@ Test the login-item component
|
|||
<p id="display">
|
||||
</p>
|
||||
<div id="content" style="display: none">
|
||||
<iframe id="templateFrame" src="aboutLogins.html"
|
||||
<iframe id="templateFrame" src="chrome://browser/content/aboutlogins/aboutLogins.html"
|
||||
sandbox="allow-same-origin"></iframe>
|
||||
</div>
|
||||
<pre id="test">
|
||||
|
|
|
@ -7,7 +7,7 @@ Test the login-list component
|
|||
<meta charset="utf-8">
|
||||
<title>Test the login-list component</title>
|
||||
<script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="module" src="login-list.js"></script>
|
||||
<script type="module" src="chrome://browser/content/aboutlogins/components/login-list.js"></script>
|
||||
<script src="aboutlogins_common.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="/tests/SimpleTest/test.css"/>
|
||||
|
@ -16,7 +16,7 @@ Test the login-list component
|
|||
<p id="display">
|
||||
</p>
|
||||
<div id="content" style="display: none">
|
||||
<iframe id="templateFrame" src="aboutLogins.html"
|
||||
<iframe id="templateFrame" src="chrome://browser/content/aboutlogins/aboutLogins.html"
|
||||
sandbox="allow-same-origin"></iframe>
|
||||
</div>
|
||||
<pre id="test">
|
||||
|
|
|
@ -8,7 +8,7 @@ Test the menu-button component
|
|||
<title>Test the menu-button component</title>
|
||||
<script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
|
||||
<script type="module" src="menu-button.js"></script>
|
||||
<script type="module" src="chrome://browser/content/aboutlogins/components/menu-button.js"></script>
|
||||
<script src="aboutlogins_common.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="/tests/SimpleTest/test.css"/>
|
||||
|
@ -17,7 +17,7 @@ Test the menu-button component
|
|||
<p id="display">
|
||||
</p>
|
||||
<div id="content" style="display: none">
|
||||
<iframe id="templateFrame" src="aboutLogins.html"
|
||||
<iframe id="templateFrame" src="chrome://browser/content/aboutlogins/aboutLogins.html"
|
||||
sandbox="allow-same-origin"></iframe>
|
||||
</div>
|
||||
<pre id="test">
|
||||
|
|
|
@ -7,7 +7,7 @@ Test the modal-input component
|
|||
<meta charset="utf-8">
|
||||
<title>Test the modal-input component</title>
|
||||
<script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="module" src="modal-input.js"></script>
|
||||
<script type="module" src="chrome://browser/content/aboutlogins/components/modal-input.js"></script>
|
||||
<script src="aboutlogins_common.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="/tests/SimpleTest/test.css"/>
|
||||
|
@ -16,7 +16,7 @@ Test the modal-input component
|
|||
<p id="display">
|
||||
</p>
|
||||
<div id="content" style="display: none">
|
||||
<iframe id="templateFrame" src="aboutLogins.html"
|
||||
<iframe id="templateFrame" src="chrome://browser/content/aboutlogins/aboutLogins.html"
|
||||
sandbox="allow-same-origin"></iframe>
|
||||
</div>
|
||||
<pre id="test">
|
||||
|
|
|
@ -15,7 +15,7 @@ Test the reflected-fluent-element component
|
|||
<p id="display">
|
||||
</p>
|
||||
<div id="content" style="display: none">
|
||||
<iframe id="templateFrame" src="aboutLogins.html"
|
||||
<iframe id="templateFrame" src="chrome://browser/content/aboutlogins/aboutLogins.html"
|
||||
sandbox="allow-same-origin"></iframe>
|
||||
</div>
|
||||
<pre id="test">
|
||||
|
@ -73,7 +73,7 @@ add_task(async function setup() {
|
|||
// element is defined.
|
||||
for (let scriptSrc of ["login-filter.js", "login-item.js", "login-list.js"]) {
|
||||
let scriptEl = document.createElement("script");
|
||||
scriptEl.setAttribute("src", scriptSrc);
|
||||
scriptEl.setAttribute("src", `chrome://browser/content/aboutlogins/components/${scriptSrc}`);
|
||||
scriptEl.setAttribute("type", "module");
|
||||
document.head.appendChild(scriptEl);
|
||||
}
|
||||
|
|
|
@ -3553,6 +3553,11 @@ static bool IsInternalURIScheme(nsIURI* uri) {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool isChrome;
|
||||
if (NS_SUCCEEDED(uri->SchemeIs("chrome", &isChrome)) && isChrome) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче