Backed out changeset 056846758066 (bug 1912074) for causing mochitest-chrome failures on test_principal.html. CLOSED TREE

This commit is contained in:
Iulian Moraru 2024-08-23 04:41:22 +03:00
Родитель d651609412
Коммит 81e55ad78b
17 изменённых файлов: 19 добавлений и 35 удалений

Просмотреть файл

@ -4,9 +4,9 @@
# 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/.
MOCHITEST_CHROME_MANIFESTS += ["test/chrome/chrome.toml"]
MOCHITEST_MANIFESTS += ["test/mochitest.toml"]
BROWSER_CHROME_MANIFESTS += ["test/browser/browser.toml"]
BROWSER_CHROME_MANIFESTS += ["test/browser.toml"]
XPIDL_SOURCES += [
"nsIAlertsService.idl",

Просмотреть файл

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 60 KiB

После

Ширина:  |  Высота:  |  Размер: 60 KiB

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 2.5 KiB

После

Ширина:  |  Высота:  |  Размер: 2.5 KiB

Просмотреть файл

@ -1,7 +1,6 @@
[DEFAULT]
skip-if = ["os == 'android'"] # We don't use XUL alerts on Android
support-files = [
"empty.html",
"image.gif",
"image.png",
"image_server.sjs",

Просмотреть файл

@ -4,8 +4,8 @@
<html>
<head>
<title>Test for Alerts Service</title>
<script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
@ -73,6 +73,7 @@ function runTest() {
notifier.showAlertNotification(null, "Notification test",
"Surprise! I'm here to test notifications!",
false, "foobarcookie", observer, alertName);
ok(true, "showAlertNotification() succeeded. Waiting for notification...");
} catch (ex) {
todo(false, "showAlertNotification() failed.", ex);
SimpleTest.finish();

Просмотреть файл

@ -4,8 +4,8 @@
<html>
<head>
<title>Test for Alerts Service</title>
<script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>

Просмотреть файл

@ -2,8 +2,8 @@
<html>
<head>
<title>Test for alerts with requireInteraction</title>
<script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<pre id="test">

Просмотреть файл

@ -2,8 +2,8 @@
<html>
<head>
<title>Test for Bug 1233086</title>
<script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
@ -16,7 +16,7 @@ const Cc = SpecialPowers.Cc;
const Ci = SpecialPowers.Ci;
const Services = SpecialPowers.Services;
const imageServerURL = "http://mochi.test:8888/chrome/toolkit/components/alerts/test/chrome/image_server.sjs";
const imageServerURL = "http://mochi.test:8888/tests/toolkit/components/alerts/test/image_server.sjs";
function makeAlert(...params) {
var alert = Cc["@mozilla.org/alert-notification;1"]

Просмотреть файл

@ -4,8 +4,8 @@
<head>
<meta charset="utf-8">
<title>Test for stability when providing invalid UTF-16 strings</title>
<script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" href="/tests/SimpleTest/test.css" />
<script>
const Cc = SpecialPowers.Cc;
const Ci = SpecialPowers.Ci;

Просмотреть файл

@ -2,8 +2,8 @@
<html>
<head>
<title>Test for multiple alerts</title>
<script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<pre id="test">

Просмотреть файл

@ -2,12 +2,11 @@
<html>
<head>
<title>Test for Bug 1202933</title>
<script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<iframe id="iframe" src="http://mochi.test:8888/chrome/toolkit/components/alerts/test/chrome/empty.html"></iframe>
<p id="display"></p>
<pre id="test">
@ -78,12 +77,7 @@ async function testNullPrincipal() {
}
async function testNodePrincipal() {
const { iframe } = document.all;
if (iframe.contentDocument.readyState !== "complete") {
await new Promise(r => iframe.onload = r);
}
var principal = iframe.contentDocument.nodePrincipal;
var principal = SpecialPowers.wrap(document).nodePrincipal;
var source = await notify("nodePrincipal", principal);
var stringBundle = Services.strings.createBundle(

Просмотреть файл

@ -625,20 +625,10 @@ ComPtr<IXmlDocument> ToastNotificationHandler::CreateToastXmlDocument() {
nsString title;
ns = action->GetTitle(title);
NS_ENSURE_SUCCESS(ns, nullptr);
if (!EnsureUTF16Validity(title)) {
MOZ_LOG(sWASLog, LogLevel::Warning,
("Notification text was invalid UTF16, unpaired surrogates have "
"been replaced."));
}
nsString actionString;
ns = action->GetAction(actionString);
NS_ENSURE_SUCCESS(ns, nullptr);
if (!EnsureUTF16Validity(actionString)) {
MOZ_LOG(sWASLog, LogLevel::Warning,
("Notification text was invalid UTF16, unpaired surrogates have "
"been replaced."));
}
nsString opaqueRelaunchData;
ns = action->GetOpaqueRelaunchData(opaqueRelaunchData);