mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:18:48 +00:00
98491d0687
- Bug 382721 - Part 1: Fix spacing of simple 2px dotted border without radius. r=jrmuizel (8e83589f45)
- Bug 382721 - Part 2: Split constants for border rendering to BorderConsts.h. r=jrmuizel (88ae5aee7f)
- Bug 1237805 part 1 - [css-grid] Remove all empty 'auto-fit' tracks, not just those at the end. r=dholbert (1c0530b87b)
- Bug 1237805 part 2 - [css-grid] 'auto-fit' reftest removing empty start/middle tracks. (3bfc688e2b)
- Bug 1239036 - [css-grid] Deal with implicit tracks when computing grid-template-{columns,rows}. r=dholbert (cf36d9193a)
- Bug 1239036 - [css-grid] Tests. (4aaec0499f)
- Bug 1238294 part 1 - [css-grid] Make GridLineEdge() a method on the Tracks class rather than a static function (idempotent change). r=dholbert (ab81994ec6)
- Bug 1238294 part 2 - [css-grid] Treat any gaps at the grid edges as "line thickness" so they behave the same as gaps between tracks for positioning areas. r=dholbert (fafdc1ceef)
- Bug 1230695 - [css-grid] More abs.pos. grid alignment reftests. (330770cf1a)
- Bug 1238294 part 3 - [css-grid] Add/tweak reftests for new behavior of gaps at the grid edges. (58ff8670a1)
- Bug 1240795 - [css-grid] Refactor GetComputedTemplateColumns/Rows to return a self-contained value. r=dholbert (9c5e68418f)
- Bug 1229739 - Use the color of shadow if available for drawing emphasis marks in shadow. r=jfkthame (c19c3deb1c)
- Bug 1191597 part 3 - Convert fullscreen-api-keys to a browser chrome test. r=smaug (ad740d4c4c)
- Bug 1174575 - Part 1: Define CSSPseudoElement interface. r=birtles, r=smaug (1a304d59c4)
- Bug 1214536 - Part 1: Use unrestricted double for iterations. r=birtles (0dbb02e423)
- Bug 1214536 - Part 2: Replace mIterationCount in layers::Animation. r=birtles (8a573046f5)
- Bug 1214536 - Part 3: Store the original value of fill. r=birtles (df548c244a)
- Bug 1214536 - Part 4: Use OwingUnrestrictedDoubleOrString for duration. r=birtles (567cfd1555)
- Bug 1214536 - Part 5: Add AnimationEffectTimingReadOnly interface. r=birtles, r=smaug (47138ec7f0)
- Bug 1214536 - Part 6: Revise AnimationTiming::operator==. r=birtles (616fc2c711)
- Bug 1214536 - Part 7: Rename AnimationTiming as TimingParams. r=birtles, r=smaug (d7de0ec72b)
- Bug 1214536 - Part 8: Add an operator=() for TimingParams. r=birtles (bfe22c6501)
- Bug 1215406 - Part 6: Test. r=birtles (3f16796304)
- Bug 1214536 - Part 9: Test. r=birtles (526419cc1d)
- Bug 1147673 - Unadjust clip before intersecting it with the scroll clip. r=botond (85cd06d2d5)
- Bug 1147673 - Determine more accurately whether an async transform affects a layer's clip rect. r=kats (8ce7d1e887)
- Bug 1096773 part 1 - Make the frames argument to the KeyframeEffectReadOnly constructor NOT optional; r=bz (6e63b08671)
- Bug 1096773 part 2 - Add a KeyframeEffectReadOnly constructor that takes a TimingParams argument; r=boris (24971306e6)
- Bug 1096773 part 3 - Implement Animatable.animate(); r=bz (9d95ea800e)
- Bug 1096773 part 4 - Add tests for Animatable.animate(); r=bz (03b866b2d8)
- Bug 1179627 - Part 1: Implement Animation.id. r=smaug, r=birtles (51bbed6e9d)
- Bug 1096774 - Part 1: Implement Animation Constructor. r=birtles, r=smaug (e09d7fbd7c)
- Bug 1179627 - Part 2: Add animation.id for CSS animations test files. r=bbirtles, r=hiikezoe (329ea31f33)
- Bug 1096774 - Part 2: Fix crash if animation has no timeline. r=birtles (d989b44866)
- Bug 1096774 - Part 3: Tests for Animation Contructor. r=birtles (23786774bc)
- Bug 1240265 - Annotate intentional switch fallthroughs in dom/. r=mrbkap (ffd9da3d5f)
- Bug 1227458. Make setAttributeNode be an alias for setAttributeNodeNS and setNamedItem on the attribute map be an alias for setNamedItemNS. r=smaug (f804d28b93)
- Bug 1226091 - Use MayHaveAnimations in Element::UnbindFromTree; r=smaug (1ec85f75b3)
165 lines
5.2 KiB
JavaScript
165 lines
5.2 KiB
JavaScript
"use strict";
|
|
|
|
/** Test for Bug 545812 **/
|
|
|
|
// List of key codes which should exit full-screen mode.
|
|
const kKeyList = [
|
|
{ code: "VK_ESCAPE", suppressed: true},
|
|
{ code: "VK_F11", suppressed: false},
|
|
];
|
|
|
|
function frameScript() {
|
|
let doc = content.document;
|
|
addMessageListener("Test:RequestFullscreen", () => {
|
|
doc.body.mozRequestFullScreen();
|
|
});
|
|
addMessageListener("Test:DispatchUntrustedKeyEvents", msg => {
|
|
var evt = new content.CustomEvent("Test:DispatchKeyEvents", {
|
|
detail: { code: msg.data }
|
|
});
|
|
content.dispatchEvent(evt);
|
|
});
|
|
|
|
doc.addEventListener("mozfullscreenchange", () => {
|
|
sendAsyncMessage("Test:FullscreenChanged", !!doc.mozFullScreenElement);
|
|
});
|
|
|
|
function keyHandler(evt) {
|
|
sendAsyncMessage("Test:KeyReceived", {
|
|
type: evt.type,
|
|
keyCode: evt.keyCode
|
|
});
|
|
}
|
|
doc.addEventListener("keydown", keyHandler, true);
|
|
doc.addEventListener("keyup", keyHandler, true);
|
|
doc.addEventListener("keypress", keyHandler, true);
|
|
|
|
function waitUntilActive() {
|
|
if (doc.docShell.isActive && doc.hasFocus()) {
|
|
sendAsyncMessage("Test:Activated");
|
|
} else {
|
|
setTimeout(waitUntilActive, 10);
|
|
}
|
|
}
|
|
waitUntilActive();
|
|
}
|
|
|
|
var gMessageManager;
|
|
|
|
function listenOneMessage(aMsg, aListener) {
|
|
function listener({ data }) {
|
|
gMessageManager.removeMessageListener(aMsg, listener);
|
|
aListener(data);
|
|
}
|
|
gMessageManager.addMessageListener(aMsg, listener);
|
|
}
|
|
|
|
function promiseOneMessage(aMsg) {
|
|
return new Promise(resolve => listenOneMessage(aMsg, resolve));
|
|
}
|
|
|
|
function captureUnexpectedFullscreenChange() {
|
|
ok(false, "Caught an unexpected fullscreen change");
|
|
}
|
|
|
|
function* temporaryRemoveUnexpectedFullscreenChangeCapture(callback) {
|
|
gMessageManager.removeMessageListener(
|
|
"Test:FullscreenChanged", captureUnexpectedFullscreenChange);
|
|
yield* callback();
|
|
gMessageManager.addMessageListener(
|
|
"Test:FullscreenChanged", captureUnexpectedFullscreenChange);
|
|
}
|
|
|
|
function captureUnexpectedKeyEvent(type) {
|
|
ok(false, `Caught an unexpected ${type} event`);
|
|
}
|
|
|
|
function* temporaryRemoveUnexpectedKeyEventCapture(callback) {
|
|
gMessageManager.removeMessageListener(
|
|
"Test:KeyReceived", captureUnexpectedKeyEvent);
|
|
yield* callback();
|
|
gMessageManager.addMessageListener(
|
|
"Test:KeyReceived", captureUnexpectedKeyEvent);
|
|
}
|
|
|
|
function* receiveExpectedKeyEvents(keyCode) {
|
|
info("Waiting for key events");
|
|
let events = ["keydown", "keypress", "keyup"];
|
|
while (events.length > 0) {
|
|
let evt = yield promiseOneMessage("Test:KeyReceived");
|
|
let expected = events.shift();
|
|
is(evt.type, expected, `Should receive a ${expected} event`);
|
|
is(evt.keyCode, keyCode,
|
|
`Should receive the event with key code ${keyCode}`);
|
|
}
|
|
}
|
|
|
|
const kPage = "http://example.org/browser/" +
|
|
"dom/html/test/file_fullscreen-api-keys.html";
|
|
|
|
add_task(function* () {
|
|
yield pushPrefs(
|
|
["full-screen-api.transition-duration.enter", "0 0"],
|
|
["full-screen-api.transition-duration.leave", "0 0"]);
|
|
|
|
let tab = gBrowser.addTab(kPage);
|
|
let browser = tab.linkedBrowser;
|
|
gBrowser.selectedTab = tab;
|
|
registerCleanupFunction(() => gBrowser.removeTab(tab));
|
|
yield waitForDocLoadComplete();
|
|
|
|
gMessageManager = browser.messageManager;
|
|
gMessageManager.loadFrameScript(
|
|
"data:,(" + frameScript.toString() + ")();", false);
|
|
|
|
// Wait for the document being actived, so that
|
|
// fullscreen request won't be denied.
|
|
yield promiseOneMessage("Test:Activated");
|
|
|
|
// Register listener to capture unexpected events
|
|
gMessageManager.addMessageListener(
|
|
"Test:FullscreenChanged", captureUnexpectedFullscreenChange);
|
|
gMessageManager.addMessageListener(
|
|
"Test:KeyReceived", captureUnexpectedKeyEvent);
|
|
registerCleanupFunction(() => {
|
|
gMessageManager.removeMessageListener(
|
|
"Test:FullscreenChanged", captureUnexpectedFullscreenChange);
|
|
gMessageManager.removeMessageListener(
|
|
"Test:KeyReceived", captureUnexpectedKeyEvent);
|
|
});
|
|
|
|
for (let {code, suppressed} of kKeyList) {
|
|
var keyCode = KeyEvent["DOM_" + code];
|
|
info(`Test keycode ${code} (${keyCode})`);
|
|
|
|
info("Enter fullscreen");
|
|
yield* temporaryRemoveUnexpectedFullscreenChangeCapture(function* () {
|
|
gMessageManager.sendAsyncMessage("Test:RequestFullscreen");
|
|
let state = yield promiseOneMessage("Test:FullscreenChanged");
|
|
ok(state, "The content should have entered fullscreen");
|
|
ok(document.mozFullScreenElement,
|
|
"The chrome should also be in fullscreen");
|
|
});
|
|
|
|
info("Dispatch untrusted key events from content");
|
|
yield* temporaryRemoveUnexpectedKeyEventCapture(function* () {
|
|
gMessageManager.sendAsyncMessage("Test:DispatchUntrustedKeyEvents", code);
|
|
yield* receiveExpectedKeyEvents(keyCode);
|
|
});
|
|
|
|
info("Send trusted key events");
|
|
yield* temporaryRemoveUnexpectedFullscreenChangeCapture(function* () {
|
|
yield* temporaryRemoveUnexpectedKeyEventCapture(function* () {
|
|
EventUtils.synthesizeKey(code, {});
|
|
if (!suppressed) {
|
|
yield* receiveExpectedKeyEvents(keyCode);
|
|
}
|
|
let state = yield promiseOneMessage("Test:FullscreenChanged");
|
|
ok(!state, "The content should have exited fullscreen");
|
|
ok(!document.mozFullScreenElement,
|
|
"The chrome should also have exited fullscreen");
|
|
});
|
|
});
|
|
}
|
|
});
|