зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1702330 - Fix browser_registerProtocolHandler_notification.js r=mconley
Depends on D110963 Differential Revision: https://phabricator.services.mozilla.com/D111308
This commit is contained in:
Родитель
77be5a8d55
Коммит
103dedd38d
|
@ -39,12 +39,32 @@ add_task(async function() {
|
|||
"info",
|
||||
"We expect this notification to have the type of 'info'."
|
||||
);
|
||||
ok(
|
||||
notification.messageImage.getAttribute("src"),
|
||||
"We expect this notification to have an icon."
|
||||
);
|
||||
|
||||
let buttons = notification.getElementsByClassName("notification-button");
|
||||
if (gProton) {
|
||||
// Make sure the CSS is fully loaded...
|
||||
await TestUtils.waitForCondition(
|
||||
() =>
|
||||
notification.shadowRoot.styleSheets.length &&
|
||||
[...notification.shadowRoot.styleSheets].every(s => s.rules.length)
|
||||
);
|
||||
is(
|
||||
notification.ownerGlobal.getComputedStyle(
|
||||
notification.messageImage,
|
||||
"::after"
|
||||
).content,
|
||||
'url("chrome://global/skin/icons/info.svg")',
|
||||
"We expect this notification to have an icon."
|
||||
);
|
||||
} else {
|
||||
ok(
|
||||
notification.messageImage.getAttribute("src"),
|
||||
"We expect this notification to have an icon."
|
||||
);
|
||||
}
|
||||
|
||||
let buttons = notification.buttonContainer.getElementsByClassName(
|
||||
"notification-button"
|
||||
);
|
||||
is(buttons.length, 1, "We expect see one button.");
|
||||
|
||||
let button = buttons[0];
|
||||
|
|
Загрузка…
Ссылка в новой задаче