forked from mozilla/gecko-dev
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MozReview-Commit-ID: 8DYKNuMdzFd
- Loading branch information
Showing
47 changed files
with
13,753 additions
and
13,336 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
dom/tests/mochitest/general/test_focus_scrollchildframe.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!DOCTYPE HTML> | ||
<html> | ||
<head> | ||
<title>Tests for for-of loops</title> | ||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> | ||
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script> | ||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"> | ||
</head> | ||
<body onload="doTest()"> | ||
<p id="display"></p> | ||
<div id="content" style="display: none"></div> | ||
<script> | ||
function doTest() { | ||
document.getElementById("button").focus(); | ||
is(window.scrollY, 0, "Scrolled position initially 0"); | ||
synthesizeKey("VK_TAB", { }), | ||
ok(window.scrollY > 200, "Scrolled child frame into view"); | ||
SimpleTest.finish(); | ||
} | ||
SimpleTest.waitForExplicitFinish(); | ||
</script> | ||
<button id="button">B</button><br><iframe style="margin-top:10000px;height:400px"></iframe> | ||
</body> | ||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<!DOCTYPE HTML> | ||
<html> | ||
<!-- | ||
https://bugzilla.mozilla.org/show_bug.cgi?id=641748 | ||
webcam-simulacrum.mgif is a hand-edited file containing red.gif and blue.gif, | ||
concatenated together with the relevant headers for | ||
multipart/x-mixed-replace. Specifically, with the headers in | ||
webcam-simulacrum.mjpg^headers^, the web browser will get the following: | ||
HTTP 200 OK | ||
Content-Type: multipart/x-mixed-replace;boundary=BOUNDARYOMG | ||
\-\-BOUNDARYOMG\r\n | ||
Content-Type: image/gif\r\n | ||
\r\n | ||
<contents of red.gif> (no newline) | ||
\-\-BOUNDARYOMG\r\n | ||
Content-Type: image/gif\r\n | ||
\r\n | ||
<contents of blue.gif> (no newline) | ||
\-\-BOUNDARYOMG\-\-\r\n | ||
(The boundary is arbitrary, and just has to be defined as something that | ||
won't be in the text of the contents themselves. \-\-$(boundary)\r\n means | ||
"Here is the beginning of a boundary," and \-\-$(boundary)\-\- means "All done | ||
sending you parts.") | ||
--> | ||
<head> | ||
<title>Test for Bug 641748 - WebCam Simulacrum</title> | ||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> | ||
<script type="application/javascript" src="/tests/SimpleTest/WindowSnapshot.js"></script> | ||
<script type="application/javascript" src="imgutils.js"></script> | ||
<script type="application/javascript" src="animationPolling.js"></script> | ||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> | ||
</head> | ||
<body> | ||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=641748"> | ||
Mozilla Bug 641748: GIF decoder doesn't support multipart/x-mixed-replace | ||
</a> | ||
<p id="display"></p> | ||
|
||
<div id="content"> | ||
<div id="referenceDiv" style="height: 100px; width: 100px; | ||
display: none; background: #0018ff;"></div> | ||
<div id="animatedImage"> | ||
<img id="animatedGif" src="webcam-simulacrum.sjs" style="display: none; height: 100px; width: 100px;"> | ||
<div id="text-descr"></div> | ||
</div> | ||
<div id="debug" style="display:none"> | ||
</div> | ||
</div> | ||
<pre id="test"> | ||
<script type="text/javascript;version=1.8"> | ||
const FAILURE_TIMEOUT = 60000; // Fail early after 60 seconds | ||
|
||
function main() | ||
{ | ||
var animTest = new AnimationTest(20, FAILURE_TIMEOUT, 'referenceDiv', | ||
'animatedGif', 'debug'); | ||
animTest.beginTest(); | ||
} | ||
|
||
window.onload = main; | ||
</script> | ||
</pre> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* Any copyright is dedicated to the Public Domain. | ||
* http://creativecommons.org/publicdomain/zero/1.0/ | ||
*/ | ||
|
||
var counter = 2; | ||
var frames = ['red.gif', 'blue.gif']; | ||
var timer = Components.classes["@mozilla.org/timer;1"]; | ||
var partTimer = timer.createInstance(Components.interfaces.nsITimer); | ||
|
||
function getFileAsInputStream(aFilename) { | ||
var file = Components.classes["@mozilla.org/file/directory_service;1"] | ||
.getService(Components.interfaces.nsIProperties) | ||
.get("CurWorkD", Components.interfaces.nsIFile); | ||
|
||
file.append("tests"); | ||
file.append("image"); | ||
file.append("test"); | ||
file.append("mochitest"); | ||
file.append(aFilename); | ||
|
||
var fileStream = Components.classes['@mozilla.org/network/file-input-stream;1'] | ||
.createInstance(Components.interfaces.nsIFileInputStream); | ||
fileStream.init(file, 1, 0, false); | ||
return fileStream; | ||
} | ||
|
||
function handleRequest(request, response) | ||
{ | ||
response.setHeader("Content-Type", | ||
"multipart/x-mixed-replace;boundary=BOUNDARYOMG", false); | ||
response.setHeader("Cache-Control", "no-cache", false); | ||
response.setStatusLine(request.httpVersion, 200, "OK"); | ||
response.processAsync(); | ||
response.write("--BOUNDARYOMG\r\n"); | ||
while (frames.length > 0) { | ||
sendNextPart(response); | ||
} | ||
response.write("--BOUNDARYOMG--\r\n"); | ||
response.finish(); | ||
} | ||
|
||
function sendNextPart(response) { | ||
var nextPartHead = "Content-Type: image/gif\r\n\r\n"; | ||
var inputStream = getFileAsInputStream(frames.shift()); | ||
response.bodyOutputStream.write(nextPartHead, nextPartHead.length); | ||
response.bodyOutputStream.writeFrom(inputStream, inputStream.available()); | ||
inputStream.close(); | ||
// Toss in the boundary, so the browser can know this part is complete | ||
response.write("--BOUNDARYOMG\r\n"); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.