Backed out changeset ff995f2f71f2 (bug 1378313) for frequently failing test_accessiblecaret_cursor_mode.py on Linux opt. r=backout

This commit is contained in:
Sebastian Hengst 2017-07-06 18:33:05 +02:00
Родитель e78edcc736
Коммит b90c33261c
4 изменённых файлов: 15 добавлений и 10 удалений

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

@ -474,10 +474,12 @@ toolbar:not(#TabsToolbar) > #personal-bookmarks {
visibility: collapse;
}
/* Temporarily disable the reload button to prevent the user from
accidentally reloading the page when intending to click the stop button. */
#reload-button[temporarily-disabled] {
pointer-events: none;
/* The reload-button is only disabled temporarily when it becomes visible
to prevent users from accidentally clicking it. We don't however need
to show this disabled state, as the flicker that it generates is short
enough to be visible but not long enough to explain anything to users. */
#reload-button[disabled]:not(:-moz-window-inactive) > .toolbarbutton-icon {
opacity: 1 !important;
}
#PanelUI-feeds > .feed-toolbarbutton:-moz-locale-dir(rtl) {

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

@ -4968,10 +4968,11 @@ var CombinedStopReload = {
// Temporarily disable the reload button to prevent the user from
// accidentally reloading the page when intending to click the stop button
this.reload.setAttribute("temporarily-disabled", "true");
this.reload.disabled = true;
this._timer = setTimeout(function(self) {
self._timer = 0;
self.reload.removeAttribute("temporarily-disabled");
self.reload.disabled = XULBrowserWindow.reloadCommand
.getAttribute("disabled") == "true";
}, 650, this);
},

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

@ -24,8 +24,9 @@ add_task(async function testTempPermissionOnReload() {
await ContentTask.spawn(browser, {}, () => content.document.location.reload());
await reloaded;
await BrowserTestUtils.waitForCondition(() =>
!reloadButton.disabled && !reloadButton.hasAttribute("temporarily-disabled"));
await BrowserTestUtils.waitForCondition(() => {
return reloadButton.disabled == false;
});
Assert.deepEqual(SitePermissions.get(uri, id, browser), {
state: SitePermissions.BLOCK,

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

@ -105,8 +105,9 @@ add_task(async function test_reloadButton() {
"https://example.com" + DIRECTORY_PATH +
"formless_basic.html");
await BrowserTestUtils.waitForCondition(() =>
!reloadButton.disabled && !reloadButton.hasAttribute("temporarily-disabled"));
await BrowserTestUtils.waitForCondition(() => {
return reloadButton.disabled == false;
});
EventUtils.synthesizeMouseAtCenter(reloadButton, {});
await loadPromise;
});