import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo

This commit is contained in:
Roy Tam 2018-01-19 03:59:58 +08:00
commit dcd9973243
150858 changed files with 23884658 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 B

View file

@ -0,0 +1,55 @@
<html>
<head>
<style>
body {
width: 100%;
margin: 0px;
transition: transform 300ms ease;
overflow-x: hidden;
}
body.section1 {
transform: translateX(0%);
}
body.section2 {
transform: translateX(-100%);
}
section {
width: 100%;
height: 100%;
position: absolute;
}
#section1 {
left: 0px;
}
#section2 {
left: 100%;
}
.mypossie {
position:absolute;
left: -1000px;
}
</style>
</head>
<body class="section1">
<section id="section1">
<div id="assertMe1">
<p>Section 1</p>
</div>
<button id="b1" onclick="var sect = document.getElementsByTagName('body')[0]; sect.classList.add('section2'); sect.classList.remove('section1');">Show section 2</button>
</section>
<section id="section2">
<div id="assertMe2">
<p>Section 2</p>
</div>
<button id="b2" onclick="var sect = document.getElementsByTagName('body')[0]; sect.classList.add('section1'); sect.classList.remove('section2'); ">Show section 1</button>
</section>
<section class='mypossie'>out in left field!</section>
</body>
</html>

View file

@ -0,0 +1,90 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- 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/. -->
<!DOCTYPE html>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<body>
<div style="height: 100px; overflow: auto;">
<table>
<tbody>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td><a href="#clicked" id="link">click me</a></td></tr>
</tbody>
</table>
</div>
</body>
</html>

View file

@ -0,0 +1,39 @@
<html>
<head>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- 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/. -->
<title>clicks</title>
</head>
<body>
<h1>Testing Clicks</h1>
<iframe id="source" src="click_source.html">
</iframe>
<iframe id="target" name="target">
</iframe>
<a href="xhtmlTest.html" id="normal">I'm a normal link</a>
<a href="#" id="anchor">I go to an anchor</a>
<a href="javascript:window.open('xhtmlTest.html', '_blank')" id="new-window">I open a window with javascript</a>
<a href="xhtmlTest.html" id="twoClientRects"><span></span><span>Click me</span></a>
<a href="xhtmlTest.html" id="link-with-enclosed-image"><img id="enclosed-image" src="./icon.gif"/></a>
<a href="xhtmlTest.html" id="link-with-enclosed-span"><span id="enclosed-span" style="color: rgb(0, 255, 0)">I'm a green link</span></a>
<p style="background: none repeat scroll 0% 0% rgb(0, 255, 0); width: 5em;"><a id="overflowLink" href="xhtmlTest.html">looooooooooong short looooooooooong</a>
</p>
<div id="bubblesTo" onclick="window.bubbledClick = true;">
<a id="bubblesFrom">I bubble</a>
</div>
<div id="addbuttonlistener" onclick="var el = document.getElementById('showbutton');el.addEventListener('mousedown', function (evt) { document.getElementById('showbutton').innerHTML = evt.button; }, false);">
click to add an event listener
</div>
<div id="showbutton">
this will show the button clicked
</div>
<a href="xhtmlTest.html">333333</a>
<p><a href="xhtmlTest.html" id="embeddedBlock"><span style="display: block;">I have a span</span><div>And a div</div><span>And another span</span></a></p>
</body>
</html>

View file

@ -0,0 +1,61 @@
<!DOCTYPE html>
<style>
#parentY {
transform: translateY(-10000px);
-webkit-transform: translateY(-10000px);
-o-transform: translateY(-10000px);
-ms-transform: translateY(-10000px);
-moz-transform: translateY(-10000px);
}
#parentX {
transform: translateX(-10000px);
-webkit-transform: translateX(-10000px);
-o-transform: translateX(-10000px);
-ms-transform: translateX(-10000px);
-moz-transform: translateX(-10000px);
}
#transformX {
transform: translateX(-10000px);
-webkit-transform: translateX(-10000px);
-o-transform: translateX(-10000px);
-ms-transform: translateX(-10000px);
-moz-transform: translateX(-10000px);
}
#transformY {
transform: translateY(-10000px);
-webkit-transform: translateY(-10000px);
-o-transform: translateY(-10000px);
-ms-transform: translateY(-10000px);
-moz-transform: translateY(-10000px);
}
#zero-transform {
transform: translateY(0px);
-webkit-transform: translateY(0px);
-o-transform: translateY(0px);
-ms-transform: translateY(0px);
-moz-transform: translateY(0px);
transform: translateX(0px);
-webkit-transform: translateX(0px);
-o-transform: translateX(0px);
-ms-transform: translateX(0px);
-moz-transform: translateX(0px);
}
</style>
<div id='zero-tranform'>
You shouldn't see anything other than this sentence on the page
</div>
<div id='parentY'>
I have a hidden child
<div id='childY'>
I am a hidden child
</div>
</div>
<div id='parentX'>
I have a hidden child
<div id='childX'>
I am a hidden child
</div>
</div>
<div id='transformX'>I am a hidden element </div>
<div id='transformY'>I am a hidden element </div>

View file

@ -0,0 +1,20 @@
<!DOCTYPE html>
<style>
#negative-percentage-transformY{
transform: translateY(-75px);
-webkit-transform: translateY(-75%);
-o-transform: translateY(-75%);
-ms-transform: translateY(-75%);
-moz-transform: translateY(-75%);
}
.block {
display = block;
}
</style>
<div class='block'>
<br/>
</div>
<br/>
<div class='block'>
</div>
<div id='negative-percentage-transformY'>I am not a hidden element </div>

View file

@ -0,0 +1,15 @@
<?xml version="1.0"?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- 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/. -->
<head>
<title>Testing date and time inputs</title>
</head>
<body>
<form>
<input id="date-test" type="date"/>
<input id="time-test" type="time"/>
</form>
</body>
</html>

View file

@ -0,0 +1,29 @@
<html>
<head>
<title></title>
</head>
<script type="text/javascript">
function remove() {
var iframe = document.getElementById("iframe1");
var myDiv = document.getElementById("myDiv");
myDiv.removeChild(iframe);
}
function addBack() {
var iframe = '<iframe src="javascriptPage.html" marginheight="0" marginwidth="0" topmargin="0" leftmargin="600" allowtransparency="true" frameborder="0" height="600" scrolling="no" width="120" id="iframe1"></iframe>';
var myDiv2 = document.getElementById("myDiv2");
myDiv2.innerHTML = iframe;
}
</script>
<body>
<div id='myDiv'>
<iframe src="formPage.html" marginheight="0" marginwidth="0" topmargin="0" leftmargin="0" allowtransparency="true"
frameborder="1" height="900" scrolling="no" width="500" id="iframe1"></iframe>
</div>
<div id='myDiv2'>
</div>
<input type='button' id='addBackFrame' value='Add back frame' onclick='addBack();' />
</body>
</html>

View file

@ -0,0 +1,18 @@
<?xml version="1.0"?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- 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/. -->
<head>
<title>Testing Double Click</title>
</head>
<div>
<p id="one-word-div">zyxw</p>
</div>
<div>
<form>
<input type="text" id="input-field" size="80"/>
</form>
</div>
</html>

View file

@ -0,0 +1,12 @@
<!DOCTYPE html>
<style>
.element{
position: absolute;
bottom: -50px;
background-color: red;
width: 100px;
height: 100px;
}
</style>
<div class='element'></div>

View file

@ -0,0 +1,12 @@
<!DOCTYPE html>
<style>
.element {
position: absolute;
left: -50px;
background-color: red;
width: 100px;
height: 100px;
}
</style>
<div class='element'></div>

View file

@ -0,0 +1,41 @@
<!DOCTYPE html>
<style>
div {
position: absolute;
width: 100px;
height: 100px;
}
.top { background-color: red; }
#top-70 { left: 80px; top: 0; }
#top-50 { left: 190px; top: 20px; }
#top-30 { left: 300px; top: 40px; }
.right { background-color: black; }
#right-70 { top: 80px; right: -140px;}
#right-50 { top: 190px; right: -120px;}
#right-30 { top: 300px; right: -100px;}
.bottom { background-color: blue; }
#bottom-70 { right: -50px; bottom: -140px; }
#bottom-50 { right: 60px; bottom: -120px; }
#bottom-30 { right: 170px; bottom: -100px; }
.left { background-color: green; }
#left-70 { bottom: -50px; left: 0; }
#left-50 { bottom: 60px; left: 20px; }
#left-30 { bottom: 170px; left: 40px; }
</style>
<body onload="window.scrollTo(70, 70);">
<div id="top-70" class="top"></div>
<div id="top-50" class="top"></div>
<div id="top-30" class="top"></div>
<div id="right-70" class="right"></div>
<div id="right-50" class="right"></div>
<div id="right-30" class="right"></div>
<div id="bottom-70" class="bottom"></div>
<div id="bottom-50" class="bottom"></div>
<div id="bottom-30" class="bottom"></div>
<div id="left-70" class="left"></div>
<div id="left-50" class="left"></div>
<div id="left-30" class="left"></div>
</body>

View file

@ -0,0 +1,12 @@
<!DOCTYPE html>
<style>
.element{
position: absolute;
right: -50px;
background-color: red;
width: 100px;
height: 100px;
}
</style>
<div class='element'></div>

View file

@ -0,0 +1,12 @@
<!DOCTYPE html>
<style>
.element{
position: absolute;
top: -50px;
background-color: red;
width: 100px;
height: 100px;
}
</style>
<div class='element'></div>

View file

@ -0,0 +1,12 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- 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/. -->
<!DOCTYPE html>
<html>
<head>
<title>Marionette Test</title>
</head>
<body>
</body>
</html>

View file

@ -0,0 +1,116 @@
<html>
<head>
<title>We Leave From Here</title>
<script type="text/javascript">
function changePage() {
var newLocation = '/common/page/3';
window.location = newLocation;
}
</script>
</head>
<body>
There should be a form here:
<form method="get" action="resultPage.html" name="login">
<input type="email" id="email"/>
<input type="submit" id="submitButton" value="Hello there"/>
</form>
<form method="get" action="resultPage.html" name="optional" style="display: block">
Here's a checkbox:
<input type="checkbox" id="checky" name="checky" value="furrfu"/>
<input type="checkbox" id="checkedchecky" name="checkedchecky" checked="checked" />
<input type="checkbox" id="disabledchecky" disabled="disabled" name="disabledchecky" />
<input type="checkbox" id="randomly_disabled_checky" disabled="somerandomstring" checked="checked" name="randomlydisabledchecky" />
<br/>
<select name="selectomatic">
<option selected="selected" id="non_multi_option" value="one">One</option>
<option value="two">Two</option>
<option value="four">Four</option>
<option value="still learning how to count, apparently">Still learning how to count, apparently</option>
</select>
<select name="multi" id="multi" multiple="multiple">
<option selected="selected" value="eggs">Eggs</option>
<option value="ham">Ham</option>
<option selected="selected" value="sausages">Sausages</option>
<option value="onion gravy">Onion gravy</option>
</select>
<select name="no-select" disabled="disabled">
<option value="foo">Foo</option>
</select>
<select name="select_empty_multiple" multiple>
<option id="multi_1" value="select_1">select_1</option>
<option id="multi_2" value="select_2">select_2</option>
<option id="multi_3" value="select_3">select_3</option>
<option id="multi_4" value="select_4">select_4</option>
</select>
<select name="multi_true" multiple="true">
<option id="multi_true_1" value="select_1">select_1</option>
<option id="multi_true_2" value="select_2">select_2</option>
</select>
<select name="multi_false" multiple="false">
<option id="multi_false_1" value="select_1">select_1</option>
<option id="multi_false_2" value="select_2">select_2</option>
</select>
<select id="invisi_select" style="opacity:0;">
<option selected value="apples">Apples</option>
<option value="oranges">Oranges</option>
</select>
<select name="select-default">
<option>One</option>
<option>Two</option>
<option>Four</option>
<option>Still learning how to count, apparently</option>
</select>
<select name="select_with_spaces">
<option>One</option>
<option> Two </option>
<option>
Four
</option>
<option>
Still learning how to count,
apparently
</option>
</select>
<select>
<option id="blankOption"></option>
<option id="optionEmptyValueSet" value="">nothing</option>
</select>
<br/>
<input type="radio" id="cheese" name="snack" value="cheese"/>Cheese<br/>
<input type="radio" id="peas" name="snack" value="peas"/>Peas<br/>
<input type="radio" id="cheese_and_peas" name="snack" value="cheese and peas" checked/>Cheese and peas<br/>
<input type="radio" id="nothing" name="snack" value="nowt" disabled="disabled"/>Not a sausage<br/>
<input type="radio" id="randomly_disabled_nothing" name="snack" value="funny nowt" disabled="somedisablingstring"/>Not another sausage
<input type="hidden" name="hidden" value="fromage" />
<p id="cheeseLiker">I like cheese</p>
<input type="submit" value="Click!"/>
<input type="radio" id="lone_disabled_selected_radio" name="not_a_snack" value="cumberland" checked="checked" disabled="disabled" />Cumberland sausage
</form>
<input type='button' id='killIframe' onclick='top.remove();' value="Kill containing iframe" />
<form method="get" action="formPage.html">
<p>
<label for="checkbox-with-label" id="label-for-checkbox-with-label">Label</label><input type="checkbox" id="checkbox-with-label" />
</p>
</form>
<input id="vsearchGadget" name="SearchableText" type="text" size="18" value="" title="Hvad søger du?" accesskey="4" class="inputLabel" />
</body>
</html>

View file

@ -0,0 +1,14 @@
<html>
<head>
<title>Unique title</title>
</head>
<frameset cols="*, *, *, *, *, *, *">
<frame name="first" src="page/1"/>
<frame name="second" src="page/2?title=Fish"/>
<frame name="third" src="formPage.html"/>
<frame name="fourth" src="framesetPage2.html"/>
<frame id="fifth" src="xhtmlTest.html"/>
<frame id="sixth" src="test_iframe.html"/>
<frame id="sixth.iframe1" src="page/3"/>
</frameset>
</html>

View file

@ -0,0 +1,7 @@
<html>
<head></head>
<frameset cols="*, *">
<frame name="child1" src="test.html"/>
<frame name="child2" src="test.html"/>
</frameset>
</html>

View file

@ -0,0 +1,5 @@
<!DOCTYPE html>
<div id='singleHidden' hidden>This will not be visible</div>
<div id='parent' hidden>
<div id='child'>My parent is hidden so you can't see me</div>
</div>

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 B

View file

@ -0,0 +1,2 @@
<!DOCTYPE html>
<input id='disabled' disabled>

View file

@ -0,0 +1,18 @@
function success(position) {
var message = document.getElementById("status");
message.innerHTML ="<img src='http://maps.google.com/maps/api/staticmap?center=" + position.coords.latitude + "," + position.coords.longitude + "&size=300x200&maptype=roadmap&zoom=12&&markers=size:mid|color:red|" + position.coords.latitude + "," + position.coords.longitude + "&sensor=false' />";
message.innerHTML += "<p>Longitude: " + position.coords.longitude + "</p>";
message.innerHTML += "<p>Latitude: " + position.coords.latitude + "</p>";
message.innerHTML += "<p>Altitude: " + position.coords.altitude + "</p>";
}
function error(msg) {
var message = document.getElementById("status");
message.innerHTML = "Failed to get geolocation.";
}
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(success, error);
} else {
error('Geolocation is not supported.');
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 B

View file

@ -0,0 +1 @@
<html><head><title>Offline</title></head><body></body></html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 B

View file

@ -0,0 +1 @@
<html><head><title>Online</title></head><body></body></html>

View file

@ -0,0 +1,11 @@
CACHE MANIFEST
CACHE:
# Additional items to cache.
yellow.jpg
red.jpg
blue.jpg
green.jpg
FALLBACK:
status.html offline.html

View file

@ -0,0 +1,2 @@
<!DOCTYPE html>
<input id='number' type=number>

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 B

View file

@ -0,0 +1,45 @@
<html manifest="html5/test.appcache">
<!--
Copyright 2011 Software Freedom Conservancy.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<head>
<title>HTML5</title>
</head>
<body>
<h3>Geolocation Test</h3>
<div id="status">Location unknown</div>
<script language="javascript" type="text/javascript" src="html5/geolocation.js"></script>
<h3>Application Cache Test</h3>
<div id="images">
<p>Current network status: <span id="state"></span></p>
<script>
var state = document.getElementById('state')
setInterval(function () {
state.className = navigator.onLine ? 'online' : 'offline';
state.innerHTML = navigator.onLine ? 'online' : 'offline';
}, 250);
</script>
<img id="red" src="html5/red.jpg">
<img id="blue" src="html5/blue.jpg">
<img id="green" src="html5/green.jpg">
<img id="yellow" src="html5/yellow.jpg">
</div>
</body>
</html>

View file

@ -0,0 +1,278 @@
<?xml version="1.0"?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- 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/. -->
<head>
<title>Testing Javascript</title>
<script type="text/javascript">
var seen = {};
function updateContent(input) {
document.getElementById('result').innerHTML = "<p>" + input.value + "</p>";
}
function displayMessage(message) {
document.getElementById('result').innerHTML = "<p>" + message + "</p>";
}
function appendMessage(message) {
document.getElementById('result').innerHTML += message + " ";
}
function register(message) {
if (!seen[message]) {
appendMessage(message);
seen[message] = true;
}
}
function delayedShowHide(delay, show) {
var blackBox = document.getElementById('clickToHide');
window.setTimeout(function() {
blackBox.style.display = show ? '' : 'none';
}, delay);
}
</script>
<script type="text/javascript">
var startList = function() {
// Ugh. Let's hope no-one is faking their user agent when running the tests
if (navigator.userAgent.indexOf("MSIE") != -1) {
var navRoot = document.getElementById("nav");
for (var i = 0; i < navRoot.childNodes.length; i++) {
var node = navRoot.childNodes[i];
if (node.nodeName == "LI") {
node.onmouseover = function() {
this.className += " over";
};
node.onmouseout = function() {
this.className = this.className.replace(" over", "");
};
}
}
}
};
window.onload=startList;
</script>
<style type="text/css">
#nav {
padding: 0; margin: 0; list-style: none;
}
#nav li {
float: left; position: relative; width: 10em;
}
#nav li ul {
display: none; position: absolute; top: 1em; left: 0;
}
#nav li > ul { top: auto; left: auto; }
#nav li:hover ul, #nav li.over ul{ display: block; background: white; }
</style>
</head>
<body>
<h1>Type Stuff</h1>
<div>
<ul id="nav">
<li id="menu1">Menu 1
<ul>
<li id="item1" onclick="displayMessage('item 1');">Item 1</li>
<li>Item 2</li>
</ul>
</li>
</ul>
</div>
<div id="resultContainer" height="30">&nbsp;
<div id="result" style="width:300;height:60">
<p>&nbsp;</p>
</div>
</div>
<div id="formageddon">
<form action="#">
Key Up: <input type="text" id="keyUp" onkeyup="javascript:updateContent(this)"/><br/>
Key Down: <input type="text" id="keyDown" onkeydown="javascript:updateContent(this)"/><br/>
Key Press: <input type="text" id="keyPress" onkeypress="javascript:updateContent(this)"/><br/>
Change: <input type="text" id="change" onkeypress="javascript:displayMessage('change')"/><br/>
<textarea id="keyDownArea" onkeydown="javascript:updateContent(this)" rows="2" cols="15"></textarea>
<textarea id="keyPressArea" onkeypress="javascript:updateContent(this)" rows="2" cols="15"></textarea>
<textarea id="keyUpArea" onkeyup="javascript:updateContent(this)" rows="2" cols="15"></textarea>
<select id="selector" onchange="javascript:updateContent(this)">
<option value="foo">Foo</option>
<option value="bar">Bar</option>
</select>
<input type="checkbox" id="checkbox" value="checkbox thing" onchange="javascript:updateContent(this)"/>
<input id="clickField" type="text" onclick="document.getElementById('clickField').value='Clicked';" value="Hello"/>
<input id="doubleClickField" type="text" onclick="document.getElementById('doubleClickField').value='Clicked';" ondblclick="document.getElementById('doubleClickField').value='DoubleClicked';" oncontextmenu="document.getElementById('doubleClickField').value='ContextClicked'; return false;" value="DoubleHello"/>
<input id="clearMe" value="Something" onchange="displayMessage('Cleared')"/>
</form>
</div>
<div>
<p><a href="#" onclick="javascript:document.title='Changed'">Change the page title!</a></p>
<p><a onclick="javascript:document.title='Changed'" id="nohref">No href</a></p>
<p><a id="updatediv" href="#" onclick="javascript:document.getElementById('dynamo').innerHTML = 'Fish and chips!';">Update a
div</a></p>
</div>
<div id="dynamo">What's for dinner?</div>
<div id="mousedown" onmousedown="javascript:displayMessage('mouse down');">
<p>Click for the mouse down event</p>
<span><p id="child">Here's some text</p></span>
</div>
<div id="mouseup" onmouseup="javascript:displayMessage('mouse up');">
<p>Click for the mouse up event</p>
</div>
<div id="mouseclick" onclick="javascript:displayMessage('mouse click');">
<p>Click for the mouse click event</p>
</div>
<div id="mousebutton">
<p>Click to show button</p>
</div>
<div id="error" onclick="document.getElementById('doesnotexist').innerHTML = 'cheese';">
Clicking this causes a JS exception in the click handler
</div>
<div>
<form action="resultPage.html" id="on-form">
<input id="theworks"
onfocus="appendMessage('focus')"
onkeydown="appendMessage('keydown')"
onkeypress="appendMessage('keypress')"
onkeyup="appendMessage('keyup')"
onblur="appendMessage('blur')"
onchange="appendMessage('change')"
/>
<input id="changeable" name="changeable" onfocus="appendMessage('focus')" onchange="appendMessage('change')" onblur="appendMessage('blur')"/>
<button type="button" id="plainButton"
onfocus="appendMessage('focus')"
onkeydown="appendMessage('keydown')"
onkeypress="appendMessage('keypress')"
onkeyup="appendMessage('keyup')"
onblur="appendMessage('blur')"
onclick="appendMessage('click')"
onmousedown="appendMessage('mousedown ')"
onmouseup="appendMessage('mouseup ')"
onmouseover="register('mouseover ')"
onmousemove="register('mousemove ')"
>
<b>Go somewhere</b>
</button>
<button type="submit" id="submittingButton"><emph>submit</emph></button>
<button type="button" id="jsSubmitButton" onclick="javascript:document.getElementById('on-form').submit();">Submitomatic</button>
<button type="button" id="switchFocus" onclick="document.getElementById('theworks').focus();">Switch focus</button>
<button type="button" onclick="var element = document.getElementById('switchFocus'); var clickEvent = document.createEvent('MouseEvents'); clickEvent.initMouseEvent('click', true, true, null, 0, 0, 0, 0, 0,false, false, false, false, 0, element);element.dispatchEvent(clickEvent);">Do magic</button><br/>
<label id="labelForCheckbox" for="labeledCheckbox" onclick="appendMessage('labelclick')">Toggle checkbox</label><input type="checkbox" id="labeledCheckbox" onclick="appendMessage('chboxclick')"/>
</form>
<form action="javascriptPage.html" id="submitListeningForm" onsubmit="appendMessage('form-onsubmit '); return false;">
<p>
<input id="submitListeningForm-text" type="text" onsubmit="appendMessage('text-onsubmit ')" onclick="appendMessage('text-onclick ');" />
<input id="submitListeningForm-submit" type="submit" onsubmit="appendMessage('submit-onsubmit ')" onclick="appendMessage('submit-onclick ');" />
</p>
</form>
</div>
<p id="suppressedParagraph" style="display: none">A paragraph suppressed using CSS display=none</p>
<div>
<p id="displayed">Displayed</p>
<form action="#"><input type="hidden" name="hidden" /> </form>
<p id="none" style="display: none;">Display set to none</p>
<p id="hidden" style="visibility: hidden;">Hidden</p>
<div id="hiddenparent" style="height: 2em; display: none;">
<div id="hiddenchild">
<a href="#" id="hiddenlink">ok</a>
</div>
</div>
<div style="visibility: hidden;">
<span>
<input id="unclickable" />
<input type="checkbox" id="untogglable" checked="checked" />Check box you can't see
</span>
</div>
<p id="outer" style="visibility: hidden">A <b id="visibleSubElement" style="visibility: visible">sub-element that is explicitly visible</b> using CSS visibility=visible</p>
</div>
<div>
<form>
<input type="text" id="keyReporter" size="80"
onkeyup="appendMessage('up: ' + event.keyCode)"
onkeypress="appendMessage('press: ' + event.keyCode)"
onkeydown="displayMessage(''); appendMessage('down: ' + event.keyCode)" />
<input name="suppress" onkeydown="if (event.preventDefault) event.preventDefault(); event.returnValue = false; return false;" onkeypress="appendMessage('press');"/>
</form>
</div>
<!-- Used for testing styles -->
<div style="background-color: green;" id="green-parent">
<p id="style1">This should be greenish</p>
<ul>
<li id="green-item">So should this</li>
<li id="red-item" style="background-color: red;">But this is red</li>
</ul>
</div>
<a href="#" id="close" onclick="window.close();">Close window</a>
<div id="delete" onclick="var d = document.getElementById('deleted'); this.removeChild(d);">
<p id="deleted">I should be deleted when you click my containing div</p>
<p>Whereas, I should not</p>
</div>
<div>
<span id="hideMe" onclick="this.style.display = 'none';">Click to hide me.</span>
</div>
<div style="margin-top: 10px;">
Click actions delayed by 3000ms:
<div id="clickToShow" onclick="delayedShowHide(3000, true);"
style="float: left;width: 100px;height:100px;border: 1px solid black;">
Click to show black box
</div>
<div id="clickToHide" onclick="delayedShowHide(3000, false);"
style="float: left;width: 100px;height:100px;border: 1px solid black;
background-color: black; color: white; display: none;">
Click to hide black box
</div>
<div style="clear: both"></div>
</div>
<a id="new_window" onmouseup="window.open('closeable_window.html', 'close_me')" href="#">Click me to open a new window</a>
<a id="throwing-mouseover" onmouseover="throw new Error()" href="#throwing-mouseover">Mouse over me will throw a JS error</a>
<div id="parent">
<span id="movable" onmouseover="var p = document.getElementById('movable'); displayMessage('parent matches? ' + (p != event.relatedTarget));">
Click on me to show the related target
</span>
</div>
<div id="zero" style="width:0;height:0">
<div>
<img src="map.png">
</div>
</div>
<input type='text' id='notDisplayed' style='display:none'>
</body>
</html>

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,39 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- 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/. -->
<!DOCTYPE html>
<html>
<head>
<title>Marionette Test</title>
<script type="text/javascript">
function handleAlert () {
window.alert('Marionette alert');
}
function handleConfirm () {
var alertAccepted = window.confirm('Marionette confirm');
document.getElementById('confirm-result').innerHTML = alertAccepted;
}
function handlePrompt () {
var promptText = window.prompt('Marionette prompt');
document.getElementById('prompt-result').innerHTML = promptText === null ? 'null' : promptText;
}
function onBeforeUnload () {
window.onbeforeunload = function () { return "Are you sure?"; }
}
</script>
</head>
<body>
<a href="#" id="modal-alert" onclick="handleAlert()">Open an alert dialog.</a>
<a href="#" id="modal-confirm" onclick="handleConfirm()">Open a confirm dialog.</a>
<a href="#" id="modal-prompt" onclick="handlePrompt()">Open a prompt dialog.</a>
<a href="#" id="onbeforeunload-handler" onclick="onBeforeUnload()">Add an onbeforeunload handler.</a>
<a href="#" id="click-handler" onclick="document.getElementById('click-result').innerHTML='result';">Make text appear.</a>
<div id="confirm-result"></div>
<div id="prompt-result"></div>
<div id="click-result"></div>
</body>
</html>

View file

@ -0,0 +1,9 @@
<!DOCTYPE html>
<a href="1.html">hello world</a>
<a href="1.html">hello world</a><a href="1.html">hello world</a>
<div name="div1">
<a href="2.html" name="link1">hello world</a>
<a href="2.html" name="link2">hello world</a>
</div>
<a href="1.html">hello world</a><a href="1.html">hello world</a><a href="1.html">hello world</a>

View file

@ -0,0 +1,40 @@
<?xml version="1.0"?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Rectangles</title>
<style type="text/css">
div {
position: absolute;
margin: 0;
border: 0;
padding: 0;
}
#r1 {
background-color: blue;
left: 10px;
top: 10px;
width: 100px;
height: 50px;
}
#r2 {
background-color: red;
left: 11px;
top: 10px;
width: 48.666666667px;
height: 49.333333333px;
}
#r3 {
background-color: yellow;
left: 60px;
top: 10px;
width: 50px;
height: 25px;
}
</style>
</head>
<body>
<div id="r1">r1</div>
<div id="r2">r2</div>
<div id="r3">r3</div>
</body>
</html>

View file

@ -0,0 +1,17 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- 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/. -->
<html>
<head>
<title>We Arrive Here</title>
</head>
<body>
<div>
<input type='text' id='email'/>
</div>
</body>
</html>

View file

@ -0,0 +1,30 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- 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/. -->
<html>
<head></head>
<body>
<script>
function dump(event) {
var elt = event.target || event.srcElement;
document.getElementById('clicked').innerHTML = elt.innerHTML;
}
</script>
<div style='height: 150px'></div>
<ul style='overflow: scroll; width: 150px; height: 80px; background-color: yellow' onclick="dump(event)">
<li id='line1'>line1</li>
<li id='line2'>line2</li>
<li id='line3'>line3</li>
<li id='line4'>line4</li>
<li id='line5'>line5</li>
<li id='line6'>line6</li>
<li id='line7'>line7</li>
<li id='line8'>line8</li>
<li id='line9'>line9</li>
</ul>
<div>
Clicked: <span id='clicked'></span>
</div>
</body>
</html>

View file

@ -0,0 +1,24 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- 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/. -->
<html>
<head></head>
<body>
<ul style='overflow: scroll; height: 100px;'>
<li></li>
<li></li>
<li id="desired">Text</li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
</body>
</html>

View file

@ -0,0 +1,18 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- 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/. -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<style type="text/css"></style>
</head>
<body>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<button id="button1">Button1</button>
<br><br><br><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<button id="button2">Button2</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
</body>
</html>

View file

@ -0,0 +1,15 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- 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/. -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<style type="text/css"></style>
</head>
<body>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<input type="radio" id="radio">
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
</body>
</html>

View file

@ -0,0 +1,20 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- 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/. -->
<html>
<head></head>
<body>
<script>
function dump(text) {
document.getElementById('clicked').innerHTML = text;
}
</script>
<div style='overflow: scroll; width: 150px; height: 200px; background-color: yellow' id="outer">
<div style="width: 150px; height: 5000px; background-color: red;" onclick="dump('clicked')" id="inner"></div>
</div>
<div>
Clicked: <span id='clicked'></span>
</div>
</body>
</html>

View file

@ -0,0 +1,282 @@
/**
* mouse_event_shim.js: generate mouse events from touch events.
*
* This library listens for touch events and generates mousedown, mousemove
* mouseup, and click events to match them. It captures and dicards any
* real mouse events (non-synthetic events with isTrusted true) that are
* send by gecko so that there are not duplicates.
*
* This library does emit mouseover/mouseout and mouseenter/mouseleave
* events. You can turn them off by setting MouseEventShim.trackMouseMoves to
* false. This means that mousemove events will always have the same target
* as the mousedown even that began the series. You can also call
* MouseEventShim.setCapture() from a mousedown event handler to prevent
* mouse tracking until the next mouseup event.
*
* This library does not support multi-touch but should be sufficient
* to do drags based on mousedown/mousemove/mouseup events.
*
* This library does not emit dblclick events or contextmenu events
*/
'use strict';
(function() {
// Make sure we don't run more than once
if (MouseEventShim)
return;
// Bail if we're not on running on a platform that sends touch
// events. We don't need the shim code for mouse events.
try {
document.createEvent('TouchEvent');
} catch (e) {
return;
}
var starttouch; // The Touch object that we started with
var target; // The element the touch is currently over
var emitclick; // Will we be sending a click event after mouseup?
// Use capturing listeners to discard all mouse events from gecko
window.addEventListener('mousedown', discardEvent, true);
window.addEventListener('mouseup', discardEvent, true);
window.addEventListener('mousemove', discardEvent, true);
window.addEventListener('click', discardEvent, true);
function discardEvent(e) {
if (e.isTrusted) {
e.stopImmediatePropagation(); // so it goes no further
if (e.type === 'click')
e.preventDefault(); // so it doesn't trigger a change event
}
}
// Listen for touch events that bubble up to the window.
// If other code has called stopPropagation on the touch events
// then we'll never see them. Also, we'll honor the defaultPrevented
// state of the event and will not generate synthetic mouse events
window.addEventListener('touchstart', handleTouchStart);
window.addEventListener('touchmove', handleTouchMove);
window.addEventListener('touchend', handleTouchEnd);
window.addEventListener('touchcancel', handleTouchEnd); // Same as touchend
function handleTouchStart(e) {
// If we're already handling a touch, ignore this one
if (starttouch)
return;
// Ignore any event that has already been prevented
if (e.defaultPrevented)
return;
// Sometimes an unknown gecko bug causes us to get a touchstart event
// for an iframe target that we can't use because it is cross origin.
// Don't start handling a touch in that case
try {
e.changedTouches[0].target.ownerDocument;
}
catch (e) {
// Ignore the event if we can't see the properties of the target
return;
}
// If there is more than one simultaneous touch, ignore all but the first
starttouch = e.changedTouches[0];
target = starttouch.target;
emitclick = true;
// Move to the position of the touch
emitEvent('mousemove', target, starttouch);
// Now send a synthetic mousedown
var result = emitEvent('mousedown', target, starttouch);
// If the mousedown was prevented, pass that on to the touch event.
// And remember not to send a click event
if (!result) {
e.preventDefault();
emitclick = false;
}
}
function handleTouchEnd(e) {
if (!starttouch)
return;
// End a MouseEventShim.setCapture() call
if (MouseEventShim.capturing) {
MouseEventShim.capturing = false;
MouseEventShim.captureTarget = null;
}
for (var i = 0; i < e.changedTouches.length; i++) {
var touch = e.changedTouches[i];
// If the ended touch does not have the same id, skip it
if (touch.identifier !== starttouch.identifier)
continue;
emitEvent('mouseup', target, touch);
// If target is still the same element we started and the touch did not
// move more than the threshold and if the user did not prevent
// the mousedown, then send a click event, too.
if (emitclick)
emitEvent('click', starttouch.target, touch);
starttouch = null;
return;
}
}
function handleTouchMove(e) {
if (!starttouch)
return;
for (var i = 0; i < e.changedTouches.length; i++) {
var touch = e.changedTouches[i];
// If the ended touch does not have the same id, skip it
if (touch.identifier !== starttouch.identifier)
continue;
// Don't send a mousemove if the touchmove was prevented
if (e.defaultPrevented)
return;
// See if we've moved too much to emit a click event
var dx = Math.abs(touch.screenX - starttouch.screenX);
var dy = Math.abs(touch.screenY - starttouch.screenY);
if (dx > MouseEventShim.dragThresholdX ||
dy > MouseEventShim.dragThresholdY) {
emitclick = false;
}
var tracking = MouseEventShim.trackMouseMoves &&
!MouseEventShim.capturing;
if (tracking) {
// If the touch point moves, then the element it is over
// may have changed as well. Note that calling elementFromPoint()
// forces a layout if one is needed.
// XXX: how expensive is it to do this on each touchmove?
// Can we listen for (non-standard) touchleave events instead?
var oldtarget = target;
var newtarget = document.elementFromPoint(touch.clientX, touch.clientY);
if (newtarget === null) {
// this can happen as the touch is moving off of the screen, e.g.
newtarget = oldtarget;
}
if (newtarget !== oldtarget) {
leave(oldtarget, newtarget, touch); // mouseout, mouseleave
target = newtarget;
}
}
else if (MouseEventShim.captureTarget) {
target = MouseEventShim.captureTarget;
}
emitEvent('mousemove', target, touch);
if (tracking && newtarget !== oldtarget) {
enter(newtarget, oldtarget, touch); // mouseover, mouseenter
}
}
}
// Return true if element a contains element b
function contains(a, b) {
return (a.compareDocumentPosition(b) & 16) !== 0;
}
// A touch has left oldtarget and entered newtarget
// Send out all the events that are required
function leave(oldtarget, newtarget, touch) {
emitEvent('mouseout', oldtarget, touch, newtarget);
// If the touch has actually left oldtarget (and has not just moved
// into a child of oldtarget) send a mouseleave event. mouseleave
// events don't bubble, so we have to repeat this up the hierarchy.
for (var e = oldtarget; !contains(e, newtarget); e = e.parentNode) {
emitEvent('mouseleave', e, touch, newtarget);
}
}
// A touch has entered newtarget from oldtarget
// Send out all the events that are required.
function enter(newtarget, oldtarget, touch) {
emitEvent('mouseover', newtarget, touch, oldtarget);
// Emit non-bubbling mouseenter events if the touch actually entered
// newtarget and wasn't already in some child of it
for (var e = newtarget; !contains(e, oldtarget); e = e.parentNode) {
emitEvent('mouseenter', e, touch, oldtarget);
}
}
function emitEvent(type, target, touch, relatedTarget) {
var synthetic = document.createEvent('MouseEvents');
var bubbles = (type !== 'mouseenter' && type !== 'mouseleave');
var count =
(type === 'mousedown' || type === 'mouseup' || type === 'click') ? 1 : 0;
synthetic.initMouseEvent(type,
bubbles, // canBubble
true, // cancelable
window,
count, // detail: click count
touch.screenX,
touch.screenY,
touch.clientX,
touch.clientY,
false, // ctrlKey: we don't have one
false, // altKey: we don't have one
false, // shiftKey: we don't have one
false, // metaKey: we don't have one
0, // we're simulating the left button
relatedTarget || null);
try {
return target.dispatchEvent(synthetic);
}
catch (e) {
console.warn('Exception calling dispatchEvent', type, e);
return true;
}
}
}());
var MouseEventShim = {
// It is a known gecko bug that synthetic events have timestamps measured
// in microseconds while regular events have timestamps measured in
// milliseconds. This utility function returns a the timestamp converted
// to milliseconds, if necessary.
getEventTimestamp: function(e) {
if (e.isTrusted) // XXX: Are real events always trusted?
return e.timeStamp;
else
return e.timeStamp / 1000;
},
// Set this to false if you don't care about mouseover/out events
// and don't want the target of mousemove events to follow the touch
trackMouseMoves: true,
// Call this function from a mousedown event handler if you want to guarantee
// that the mousemove and mouseup events will go to the same element
// as the mousedown even if they leave the bounds of the element. This is
// like setting trackMouseMoves to false for just one drag. It is a
// substitute for event.target.setCapture(true)
setCapture: function(target) {
this.capturing = true; // Will be set back to false on mouseup
if (target)
this.captureTarget = target;
},
capturing: false,
// Keep these in sync with ui.dragThresholdX and ui.dragThresholdY prefs.
// If a touch ever moves more than this many pixels from its starting point
// then we will not synthesize a click event when the touch ends.
dragThresholdX: 25,
dragThresholdY: 25
};

View file

@ -0,0 +1,38 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- 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/. -->
<!DOCTYPE html>
<html>
<head>
<title>Marionette Test</title>
</head>
<body>
<h1 id="testh1">Test Page</h1>
<script type="text/javascript">
window.ready = true;
function addDelayedElement() {
setTimeout(createDiv, 2000);
function createDiv() {
var newDiv = document.createElement("div");
newDiv.id = "newDiv";
var newContent = document.createTextNode("I am a newly created div!");
newDiv.appendChild(newContent);
document.body.appendChild(newDiv);
}
}
function clicked() {
var link = document.getElementById("mozLink");
link.innerHTML = "Clicked";
}
</script>
<a href="#" id="mozLink" class="linkClass" onclick="clicked()">Click me!</a>
<div id="testDiv">
<a href="#" id="divLink" class="linkClass" onclick="clicked()">Div click me!</a>
<a href="#" id="divLink2" class="linkClass" onclick="clicked()">Div click me!</a>
</div>
<input name="myInput" type="text" value="asdf"/>
<input name="myCheckBox" type="checkbox" />
<input id="createDivButton" type="button" value="create a div" onclick="addDelayedElement()" />
</body>
</html>

View file

@ -0,0 +1,94 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- 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/. -->
<!DOCTYPE html>
<html>
<meta charset="UTF-8">
<head>
<title>Marionette Test</title>
</head>
<body>
<h1 id="testh1">Test Page</h1>
<button id="button1" style="position:absolute;left:0px;top:55px;" type="button" allowevents=true>button1</button>
<button id="button2" style="position:absolute;left:0px;top:355px;" type="button" allowevents=true>button2</button>
<button id="button3" style="position:absolute;left:0px;top:455px;" type="button" allowevents=true>button3</button>
<button id="button4" style="position:absolute;left:100px;top:455px;" type="button" allowevents=true>button4</button>
<button id="buttonScroll" style="position:absolute;left:100px;top:855px;" type="button" allowevents=true>buttonScroll</button>
<h2 id="hidden" style="visibility: hidden" class="linkClass">Hidden</h2>
<button id="buttonFlick" style="position:absolute;left:0px;top:255px;" type="button" allowevents=true>buttonFlick</button>
<script type="text/javascript">
var button3Timer = null;
var button4Timer = null;
//appends passed in text to the innerHTML of the event's target
function appendText(text) {
return function(evt) {
var element;
if (evt.type.indexOf("touch") !== -1) {
if (evt.type == "touchstart") {
element = evt.target;
}
else {
//since the target of touchstart is the target of all subsequent events, then
//changedTouches holds the current coordinates of this touch event, so we
//use these coordinates to find the element under the touch event
var touches = evt.changedTouches;
var x = touches[0].clientX;
var y = touches[0].clientY;
element = document.elementFromPoint(x,y);
}
}
//handle mouse events or contextmenu
else {
element = evt.target;
}
element.innerHTML += text;
};
};
//use this function outside of attachListeners when you want to test sendMouseOnlyEvents on a target
function attachMouseListeners(element) {
element.addEventListener("contextmenu", appendText("-contextmenu"), false);
element.addEventListener("mousedown", appendText("-mousedown"), false);
element.addEventListener("mousemove", appendText("-mousemove"), false);
element.addEventListener("mouseup", appendText("-mouseup"), false);
element.addEventListener("click", appendText("-click"), false);
};
function attachListeners(id) {
var element = document.getElementById(id);
element.addEventListener("touchstart", appendText("-touchstart"), false);
element.addEventListener("touchmove", appendText("-touchmove"), false);
element.addEventListener("touchend", appendText("-touchend"), false);
element.addEventListener("touchcancel", appendText("-touchcancel"), false);
attachMouseListeners(element);
};
//for tracking time on an element
function addTimers(id, timer) {
var element = document.getElementById(id);
element.addEventListener("touchstart", function(evt) { timer = (new Date()).getTime();}, false);
element.addEventListener("touchend", function(evt) { timer = (new Date()).getTime() - timer; evt.target.innerHTML += "-" + timer;}, false);
}
attachListeners("button1");
attachListeners("button2");
attachListeners("button3");
attachListeners("button4");
attachListeners("buttonScroll");
addTimers("button3");
addTimers("button4");
var buttonFlick = document.getElementById("buttonFlick");
attachMouseListeners(buttonFlick);
function createDelayed() {
var newButton = document.createElement("button");
newButton.id = "delayed";
newButton.setAttribute("style", "position:absolute;left:220px;top:455px;");
var content = document.createTextNode("delayed");
newButton.appendChild(content);
document.body.appendChild(newButton);
newButton.addEventListener("mousemove", appendText("-mousemove"), false);
newButton.addEventListener("mouseup", appendText("-mouseup"), false);
newButton.addEventListener("click", appendText("-click"), false);
};
window.setTimeout(createDelayed, 5000);
</script>
</body>
</html>

View file

@ -0,0 +1,14 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- 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/. -->
<!DOCTYPE html>
<html>
<head>
<title>PageSource Test</title>
</head>
<body>
<p> Check the PageSource
</body>
</html>

View file

@ -0,0 +1,5 @@
<xml>
<foo>
<bar>baz</bar>
</foo>
</xml>

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<meta http-equiv="pragma" content="no-cache"/>
<!--
- the « section[id^="wifi-"] » selector.
-->
</body>
</html>

View file

@ -0,0 +1,9 @@
<?xml version="1.0"?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Test page for element size</title>
</head>
<body>
<p>Let's get the size of <a href='#' id='linkId'>some really cool link</a></p>
</body>
</html>

View file

@ -0,0 +1,57 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- 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/. -->
<!DOCTYPE html>
<html>
<meta charset="UTF-8">
<head>
<title>Marionette Test</title>
</head>
<body>
<button id="button1">button1</button>
<button id="button2" aria-label="button2"></button>
<span id="button3">I am a bad button with no accessible</span>
<h1 id="button4">I am a bad button that is actually a header</h1>
<h1 id="button5">
I am a bad button that is actually an actionable header with a listener
</h1>
<button id="button6"></button>
<button id="button7" aria-hidden="true">button7</button>
<div aria-hidden="true">
<button id="button8">button8</button>
</div>
<button id="button9" style="position:absolute;left:-100px;top:-455px;">
button9
</button>
<button id="button10" style="visibility:hidden;">
button10
</button>
<span id="no_accessible_but_displayed">I have no accessible object</span>
<button id="button11" disabled>button11</button>
<button id="button12" aria-disabled="true">button12</button>
<span id="no_accessible_but_disabled" disabled>I have no accessible object</span>
<span id="button13" tabindex="0" role="button" aria-label="Span button">Span button</span>
<span id="button14" role="button" aria-label="Span button">Unexplorable Span button</span>
<button id="button15" style="pointer-events:none;">button15</button>
<div style="pointer-events:none;">
<button id="button16">button16</button>
</div>
<div style="pointer-events:none;">
<button style="pointer-events:all;" id="button17">button17</button>
</div>
<input id="input1" title="My Input 1" name="myInput1" type="text" value="asdf"/>
<select>
<option id="option1" value="val1">Val1</option>
<option id="option2" value="val2" selected>Val2</option>
</select>
<script>
'use strict';
document.getElementById('button5').addEventListener('click', function() {
// A pseudo button that has a listener but is missing button semantics.
return true;
});
</script>
</body>
</html>

View file

@ -0,0 +1,31 @@
<!DOCTYPE html>
<!-- Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ -->
<html>
<head>
<meta charset="UTF-8">
<style>
#columns {
-moz-column-count: 2;
-webkit-column-count: 2;
-moz-column-rule: 1px solid lightgray;
-webkit-column-rule: 1px solid lightgray;
border: 1px solid lightblue;
width: 450px;
}
</style>
</head>
<body>
<div id="columns">
<div id="columns-inner" style="border: 1px solid red;" contenteditable="true">
<p id="before-image-1">Before image 1</p>
<p><img width="100px" height="30px" src="data:image/gif;base64,R0lGODlhAQABAIABAAD/AP///ywAAAAAAQABAAACAkQBADs="></p>
<p>After image 1</p>
<p>Before image 2</p>
<p><img width="100px" height="30px" src="data:image/gif;base64,R0lGODlhAQABAIABAAD/AP///ywAAAAAAQABAAACAkQBADs="></p>
<p>After image 2</p>
</div>
</div>
</body>
</html>

View file

@ -0,0 +1,31 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- 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/. -->
<!DOCTYPE html>
<html id="html">
<head>
<title>Marionette tests for AccessibleCaret in cursor mode</title>
<style>
.block {
width: 10em;
height: 6em;
word-wrap: break-word;
overflow: auto;
}
</style>
</head>
<body>
<div>
<input id="input" value="ABCDEFGHI">
<input id="input-padding" style="padding: 1em;" value="ABCDEFGHI">
</div>
<br>
<div>
<textarea name="textarea" id="textarea" rows="4" cols="6">ABCDEFGHI</textarea>
<textarea id="textarea-one-line" rows="3">ABCDEFGHI</textarea>
</div>
<br>
<div class="block" contenteditable="true" id="contenteditable">ABCDEFGHI</div>
</body>
</html>

View file

@ -0,0 +1,10 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- 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/. -->
<!DOCTYPE html>
<html id="html" style="display: none">
<body>
<div id="content">ABC DEF GHI</div>
</body>
</html>

View file

@ -0,0 +1,20 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- 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/. -->
<!DOCTYPE html>
<html id="html">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Marionette tests for AccessibleCaret in selection mode (iframe)</title>
</head>
<body>
<style>
*
{
-moz-user-select:none;
}
</style>
<iframe id="frame" src="test_carets_longtext.html" style="width: 10em; height: 8em;"></iframe>
</body>
</html>

View file

@ -0,0 +1,9 @@
<html>
<head>
<title>Bug 1094072: Orientation change test for AccessibleCaret positions</title>
</head>
<body id="bd">
<h3 id="longtext">long long text for orientation change test long long text for orientation change test long long text for orientation change test long long text for orientation change test</h3>
<div contenteditable="true" id="bottomtext">bottom text</div>
</body>
</html>

View file

@ -0,0 +1,24 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- 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/. -->
<!DOCTYPE html>
<html id="html">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Bug 1019441: Marionette tests for AccessibleCaret (multiple lines)</title>
</head>
<body>
<style>
*
{
-moz-user-select:none;
}
</style>
<div><textarea id="textarea2" style="width: 10em; height: 6em; overflow: auto;">First Line&#13;&#10;&#13;&#10;Second Line&#13;&#10;&#13;&#10;Third Line</textarea></div>
<br>
<div style="width: 10em; height: 6em; overflow: auto; -moz-user-select:text" id="contenteditable2" contenteditable="true">First Line<br><br>Second Line<br><br>Third Line</div>
<br>
<div style="width: 10em; height: 6em; overflow: auto; -moz-user-select:text" id="content2">First Line<br><br>Second Line<br><br>Third Line</div>
</body>
</html>

View file

@ -0,0 +1,19 @@
<html>
<style>
h4 {
-moz-user-select: none;
}
</style>
<body id=bd>
<h3 id=sel1>user can select this 1</h3>
<h3 id=sel2>user can select this 2</h3>
<h3 id=sel3>user can select this 3</h3>
<h4 id=nonsel1>user cannot select this 1</h4>
<h4 id=nonsel2>user cannot select this 2</h4>
<h3 id=sel4>user can select this 4</h3>
<h3 id=sel5>user can select this 5</h3>
<h4 id=nonsel3>user cannot select this 3</h4>
<h3 id=sel6>user can select this 6</h3>
<h3 id=sel7>user can select this 7</h3>
</body>
</html>

View file

@ -0,0 +1,38 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- 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/. -->
<!DOCTYPE html>
<html id="html">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Marionette tests for AccessibleCaret in selection mode</title>
<style>
.block {
width: 10em;
height: 4em;
word-wrap: break-word;
overflow: auto;
}
</style>
</head>
<body>
<div>
<input id="input" value="ABC DEF GHI">
<input id="input-padding" style="padding: 1em;" value="ABC DEF GHI">
</div>
<br>
<div>
<textarea id="textarea" rows="4" cols="8">ABC DEF GHI JKL MNO PQR</textarea>
<textarea id="textarea-one-line" rows="4" cols="12">ABC DEF GHI</textarea>
</div>
<br>
<div><textarea dir="rtl" id="textarea-rtl" rows="8" cols="8">موزيلا فيرفكس موزيلا فيرفكس</textarea></div>
<br>
<div class="block" contenteditable="true" id="contenteditable">ABC DEF GHI</div>
<br>
<div class="block" id="content">ABC DEF GHI</div>
<br>
<div style="-moz-user-select: none;" id="non-selectable">Non-selectable</div>
</body>
</html>

View file

@ -0,0 +1,24 @@
<html>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- 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/. -->
<body>
<input id="writableTextInput" type="text" value="Test"/>
<input id="readOnlyTextInput" type="text" readonly value="Test"/>
<input id="textInputnotenabled" type="text" disabled="true" value="Test"/>
<textarea id="writableTextArea" rows="2" cols="20">
This is a sample text area which is supposed to be cleared
</textarea>
<textarea id="textAreaReadOnly" readonly rows="5" cols="20">
text area which is not supposed to be cleared</textarea>
<textarea rows="5" id="textAreaNotenabled" disabled="true" cols="20">
text area which is not supposed to be cleared</textarea>
<div id="content-editable" contentEditable="true">This is a contentEditable area</div>
</body>
</html>

View file

@ -0,0 +1,38 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
<script type="text/javascript">
var next = 0;
function addMore() {
var box = document.createElement('DIV');
box.id = 'box' + next++;
box.className = 'redbox';
box.style.width = '150px';
box.style.height = '150px';
box.style.backgroundColor = 'red';
box.style.border = '1px solid black';
box.style.margin = '5px';
window.setTimeout(function() {
document.body.appendChild(box);
}, 1000);
}
function reveal() {
var elem = document.getElementById('revealed');
window.setTimeout(function() {
elem.style.display = '';
}, 1000);
}
</script>
</head>
<body>
<input id="adder" type="button" value="Add a box!" onclick="addMore()"/>
<input id="reveal" type="button" value="Reveal a new input" onclick="reveal();" />
<input id="revealed" style="display:none;" />
</body>
</html>

View file

@ -0,0 +1,16 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- 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/. -->
<!doctype html>
<html>
<head>
<title>Marionette IFrame Test</title>
</head>
<body>
<h1 id="iframe_page_heading">This is the heading</h1>
<iframe src="test.html" id="test_iframe"></iframe>
<iframe src="test.html" id="test_iframe" name="test_iframe_name"></iframe>
</body>
</html>

View file

@ -0,0 +1,13 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- 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/. -->
<!doctype html>
<html>
<head>
<title>Inner Iframe</title>
</head>
<body>
<iframe src="test.html" id="inner_frame"></iframe>
</body>
</html>

View file

@ -0,0 +1,13 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- 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/. -->
<!doctype html>
<html>
<head>
<title>Marionette IFrame Test</title>
</head>
<body>
<iframe src="test_inner_iframe.html" id="test_iframe"></iframe>
</body>
</html>

View file

@ -0,0 +1,15 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- 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/. -->
<!DOCTYPE html>
<html>
<head>
<title>OOP Test Frame 1</title>
</head>
<body>
<h1 id="testh1">OOP Test Frame 1</h1>
Hello!
</body>
</html>

View file

@ -0,0 +1,15 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- 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/. -->
<!DOCTYPE html>
<html>
<head>
<title>OOP Test Frame 2</title>
</head>
<body>
<h1 id="testh1">OOP Test Frame 2</h1>
Hello!
</body>
</html>

View file

@ -0,0 +1,26 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- 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/. -->
<!DOCTYPE html>
<html>
<meta charset="UTF-8">
<head>
<title>Marionette Test</title>
</head>
<body>
<div id="host"></div>
<div id="empty-host"></div>
<script>
'use strict';
var host = document.getElementById('host');
var root = host.createShadowRoot();
root.innerHTML = '<button id="button">Foo</button>' +
'<div id="inner-host"></div>';
var innerHost = host.shadowRoot.getElementById('inner-host');
var innerRoot = innerHost.createShadowRoot();
innerRoot.innerHTML = '<button id="inner-button">Bar</button>';
</script>
</body>
</html>

View file

@ -0,0 +1,14 @@
<?xml version="1.0"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- 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/. -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>XHTML Test Page</title>
</head>
<body>
<p><a href="resultPage.html" onClick='javascript:window.open("resultPage.html",null, "menubar=0,location=1,resizable=1,scrollbars=1,status=0,width=700,height=375");' name="windowOne">Open new window</a></p>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 B

View file

@ -0,0 +1,16 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- 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/. -->
<!DOCTYPE html>
<html>
<head>
<title>Marionette New Tab Link</title>
</head>
<body>
<a href="empty.html" id="new-tab" target="_blank">New Tab</a>
<a href="about:blank" id="new-blank-tab" target="_blank">New blank Tab</a>
<a href="" id="new-window" onClick='javascript:window.open("empty.html", null, "location=1,toolbar=1");'>New Window</a>
</body>
</html>

View file

@ -0,0 +1,79 @@
<?xml version="1.0"?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- 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/. -->
<head>
<title>XHTML Test Page</title>
</head>
<body>
<div class="navigation">
<p><a href="resultPage.html" target="result" name="windowOne">Open new window</a></p>
<p><a href="iframes.html" target="_blank" name="windowTwo">Create a new anonymous window</a></p>
<p><a href="test_iframe.html" name="sameWindow">Open page with iframes in same window</a></p>
<p><a href="javascriptPage.html" target="result" name="windowThree">Open a window with a close button</a></p>
</div>
<a name="notext"><b></b></a>
<div class="content">
<h1 class="header">XHTML Might Be The Future</h1>
<p>If you'd like to go elsewhere then <a href="resultPage.html">click me</a>.</p>
<p>Alternatively, <a href="resultPage.html" id="linkId">this goes to the same place</a>.</p>
<form name="someForm">
<input id="username" type="text" value="change"/>
</form>
This link has the same text as another link: <a href="resultPage.html">click me</a>.
</div>
<div class="extraDiv">Another div starts here.<p/>
<h2 class="nameA nameBnoise nameC">An H2 title</h2>
<p class="nameC">Some more text</p>
</div>
<div>
<a id="id1" href="#">Foo</a>
<ul id="id2" />
<span id="id3"/>
</div>
<div>
<table id="table" ></table>
</div>
<span id="amazing">
<div>
<div>
<div>
<span/>
<a>I have width</a>
</div>
</div>
</div>
</span>
<a name="text" />
<p id="spaces"> </p>
<p id="empty"></p>
<a href="foo" id="linkWithEqualsSign">Link=equalssign</a>
<p class=" spaceAround ">Spaced out</p>
<span id="my_span">
<div>first_div</div>
<div>second_div</div>
<span>first_span</span>
<span>second_span</span>
</span>
<div id="parent">I'm a parent
<div id="child">I'm a child</div>
</div>
<div id="only-exists-on-xhtmltest">Woo woo</div>
</body>
</html>