Update web-platform-tests to revision e03a9b1341ae9bdb1e4fa03765257b84d26fe2f1

This commit is contained in:
Josh Matthews 2017-10-16 11:11:04 -04:00
parent 7d05c76d18
commit 20a833eb75
5167 changed files with 4696 additions and 297370 deletions

View file

@ -1,62 +0,0 @@
<!doctype html>
<html>
<head>
<title>HTML5 Drag and Drop: Fire drag event during the drag and drop processing</title>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/"/>
<link rel="help" href="http://dev.w3.org/html5/spec/dnd.html#drag-and-drop-processing-model"/>
<meta name="assert" content="Fire drag event during the drag and drop processing"/>
<script src="dragdrop_support.js" type="text/javascript"></script>
<script type="text/javascript">
var EVENT, TARGET;
function DragEvent(evt)
{
if ((TARGET == evt.target) && (EVENT == evt.type))
{
LogTestResult("PASS");
}
else
{
LogTestResult("FAIL");
}
}
EVENT = "drag";
window.onload = function()
{
TARGET = document.getElementById("target");
AddEventListenersForElement(EVENT, DragEvent, false, TARGET);
}
</script>
</head>
<body>
<pre>Description: Fire drag event during the drag and drop processing</pre>
<table id='testtable' border='1'>
<tr>
<td>Test Result</td>
<td>Test Assertion</td>
</tr>
<tr>
<td id='test_result'>Manual</td>
<td id='test_assertion'>Test passes if if the word "PASS" appears to the left after following the steps below.
<div id="manualsteps">
Steps:
<ol>
<li> Click and drag the blue image
</ol>
</div>
</td>
</tr>
</table>
<p>
http://dev.w3.org/html5/spec/dnd.html#drag-and-drop-processing-model
</p>
<p>
If the user agent is still performing the previous iteration of the sequence (if any) when the next iteration becomes due, abort these steps for this iteration (effectively "skipping missed frames" of the drag-and-drop operation).
Fire a DND event named drag event at the source node. If this event is canceled, the user agent must set the current drag operation to "none" (no drag operation).
</p>
<img src="/images/blue.png" style="width:200px; height:100px" draggable="true" id="target"/>
</body>
</html>

View file

@ -1,62 +0,0 @@
<!doctype html>
<html>
<head>
<title>HTML5 Drag and Drop: Fire drag event when dragging a div element</title>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/"/>
<link rel="help" href="http://dev.w3.org/html5/spec/dnd.html#drag-and-drop-processing-model"/>
<meta name="assert" content="Fire drag event when dragging a div element"/>
<script src="dragdrop_support.js" type="text/javascript"></script>
<script type="text/javascript">
var EVENT, TARGET;
function DragEvent(evt)
{
if ((TARGET == evt.target) && (EVENT == evt.type))
{
LogTestResult("PASS");
}
else
{
LogTestResult("FAIL");
}
}
EVENT = "drag";
window.onload = function()
{
TARGET = document.getElementById("target");
AddEventListenersForElement(EVENT, DragEvent, false, TARGET);
}
</script>
</head>
<body>
<pre>Description: Fire drag event when dragging a div element</pre>
<table id='testtable' border='1'>
<tr>
<td>Test Result</td>
<td>Test Assertion</td>
</tr>
<tr>
<td id='test_result'>Manual</td>
<td id='test_assertion'>Test passes if if the word "PASS" appears to the left after following the steps below.
<div id="manualsteps">
Steps:
<ol>
<li> Click and drag the red box
</ol>
</div>
</td>
</tr>
</table>
<p>
http://dev.w3.org/html5/spec/dnd.html#drag-and-drop-processing-model
</p>
<p>
If the user agent is still performing the previous iteration of the sequence (if any) when the next iteration becomes due, abort these steps for this iteration (effectively "skipping missed frames" of the drag-and-drop operation).
Fire a DND event named drag event at the source node. If this event is canceled, the user agent must set the current drag operation to "none" (no drag operation).
</p>
<div id="target" style="border:2px red solid; width:200px; height:50px" draggable="true"></div>
</body>
</html>

View file

@ -1,64 +0,0 @@
<!doctype html>
<html>
<head>
<title>HTML5 Drag and Drop: Fire dragend event during the drag and drop processing</title>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/"/>
<link rel="help" href="http://dev.w3.org/html5/spec/dnd.html#drag-and-drop-processing-model"/>
<meta name="assert" content="Fire dragend event during the drag and drop processing"/>
<script src="dragdrop_support.js" type="text/javascript"></script>
<script type="text/javascript">
var EVENT, TARGET;
function DragendEvent(evt)
{
if ((TARGET == evt.target) && (EVENT == evt.type))
{
LogTestResult("PASS");
}
else
{
LogTestResult("FAIL");
}
}
EVENT = "dragend";
window.onload = function()
{
TARGET = document.getElementById("target");
AddEventListenersForElement(EVENT, DragendEvent, false, TARGET);
}
</script>
</head>
<body>
<pre>Description: Fire dragend event during the drag and drop processing</pre>
<table id='testtable' border='1'>
<tr>
<td>Test Result</td>
<td>Test Assertion</td>
</tr>
<tr>
<td id='test_result'>Manual</td>
<td id='test_assertion'>Test passes if if the word "PASS" appears to the left after following the steps below.
<div id="manualsteps">
Steps:
<ol>
<li> Drag the blue image
<li> Drop it on the green box
</ol>
</div>
</td>
</tr>
</table>
<p>
http://dev.w3.org/html5/spec/dnd.html#drag-and-drop-processing-model
</p>
<p>
If the drag operation failed or succeeded, fire a DND event named dragend at the source node.
</p>
<img src="/images/blue.png" style="width:200px; height:100px" draggable="true" id="target"/>
<br /><br />
<input type="text" style="border:2px green solid; width:200px; height:50px"></input>
</body>
</html>

View file

@ -1,67 +0,0 @@
<!doctype html>
<html>
<head>
<title>HTML5 Drag and Drop: Fire dragenter event during the drag and drop processing</title>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/"/>
<link rel="help" href="http://dev.w3.org/html5/spec/dnd.html#drag-and-drop-processing-model"/>
<meta name="assert" content="Fire dragenter event during the drag and drop processing"/>
<script src="dragdrop_support.js" type="text/javascript"></script>
<script type="text/javascript">
var EVENT, TARGET;
function DragenterEvent(evt)
{
if ((TARGET == evt.target) && (EVENT == evt.type))
{
LogTestResult("PASS");
}
else
{
LogTestResult("FAIL");
}
}
EVENT = "dragenter";
window.onload = function()
{
TARGET = document.getElementById("target");
AddEventListenersForElement(EVENT, DragenterEvent, false, TARGET);
}
</script>
</head>
<body>
<pre>Description: Fire dragenter event during the drag and drop processing</pre>
<table id='testtable' border='1'>
<tr>
<td>Test Result</td>
<td>Test Assertion</td>
</tr>
<tr>
<td id='test_result'>Manual</td>
<td id='test_assertion'>Test passes if if the word "PASS" appears to the left after following the steps below.
<div id="manualsteps">
Steps:
<ol>
<li> Select the text inside the red box
<li> Drag it and enter the green box
</ol>
</div>
</td>
</tr>
</table>
<p>
http://dev.w3.org/html5/spec/dnd.html#drag-and-drop-processing-model
</p>
<p>
If the user is indicating a different immediate user selection than during the last iteration (or if this is the first iteration), and if this immediate user selection is not the same as the current target element, then update the current target element as follows:
- If the new immediate user selection is null, Set the current target element to null also.
- If the new immediate user selection is in a non-DOM document or application, Set the current target element to the immediate user selection.
- Otherwise, Fire a DND event named dragenter at the immediate user selection.
</p>
<div style="border:2px red solid; width:200px; height:50px">SampleText</div>
<br /><br />
<input type="text" id="target" style="border:2px green solid; width:200px; height:50px"></input>
</body>
</html>

View file

@ -1,19 +0,0 @@
<!doctype html>
<html>
<head>
<title>HTML5 Drag and Drop: Auto state of draggable attribute for 'a' element</title>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/"/>
<link rel="help" href="http://dev.w3.org/html5/spec/dnd.html#the-draggable-attribute"/>
<meta name="assert" content="Auto state of draggable attribute for 'a' element"/>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id=log></div>
<a href="#" style="display:none" id="target">Drag this</a>
<script type="text/javascript">
test(function() {assert_true(document.getElementById("target").draggable)}, "Auto state of draggable attribute for 'a' element");
</script>
</body>
</html>

View file

@ -1,19 +0,0 @@
<!doctype html>
<html>
<head>
<title>HTML5 Drag and Drop: Auto state of draggable attribute for div element</title>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/"/>
<link rel="help" href="http://dev.w3.org/html5/spec/dnd.html#the-draggable-attribute"/>
<meta name="assert" content="Auto state of draggable attribute for div element"/>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id=log></div>
<div style="border:2px red solid; width:200px; height:50px; display:none;" id="target">SampleText</div>
<script type="text/javascript">
test(function() {assert_false(document.getElementById("target").draggable)}, "Auto state of draggable attribute for div element");
</script>
</body>
</html>

View file

@ -1,19 +0,0 @@
<!doctype html>
<html>
<head>
<title>HTML5 Drag and Drop: Auto state of draggable attribute for img element</title>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/"/>
<link rel="help" href="http://dev.w3.org/html5/spec/dnd.html#the-draggable-attribute"/>
<meta name="assert" content="Auto state of draggable attribute for img element"/>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id=log></div>
<img style="width:200px; height:100px; display:none;" id="target"/>
<script type="text/javascript">
test(function() {assert_true(document.getElementById("target").draggable)}, "Auto state of draggable attribute for img element");
</script>
</body>
</html>

View file

@ -1,19 +0,0 @@
<!doctype html>
<html>
<head>
<title>HTML5 Drag and Drop: False state of draggable attribute</title>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/"/>
<link rel="help" href="http://dev.w3.org/html5/spec/dnd.html#the-draggable-attribute"/>
<meta name="assert" content="False state of draggable attribute"/>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id=log></div>
<a href="#" style="display:none" id="target" draggable="false">Drag this</a>
<script type="text/javascript">
test(function() {assert_false(document.getElementById("target").draggable)}, "False state of draggable attribute");
</script>
</body>
</html>

View file

@ -1,19 +0,0 @@
<!doctype html>
<html>
<head>
<title>HTML5 Drag and Drop: True state of draggable attribute</title>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/"/>
<link rel="help" href="http://dev.w3.org/html5/spec/dnd.html#the-draggable-attribute"/>
<meta name="assert" content="True state of draggable attribute"/>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id=log></div>
<a href="#" style="display:none" id="target" draggable="true">Drag this</a>
<script type="text/javascript">
test(function() {assert_true(document.getElementById("target").draggable)}, "True state of draggable attribute");
</script>
</body>
</html>

View file

@ -1,66 +0,0 @@
<!doctype html>
<html>
<head>
<title>HTML5 Drag and Drop: Fire dragleave event during the drag and drop processing</title>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/"/>
<link rel="help" href="http://dev.w3.org/html5/spec/dnd.html#drag-and-drop-processing-model"/>
<meta name="assert" content="Fire dragleave event during the drag and drop processing"/>
<script src="dragdrop_support.js" type="text/javascript"></script>
<script type="text/javascript">
var EVENT, TARGET;
function DragleaveEvent(evt)
{
if ((TARGET == evt.target) && (EVENT == evt.type))
{
LogTestResult("PASS");
}
else
{
LogTestResult("FAIL");
}
}
EVENT = "dragleave";
window.onload = function()
{
TARGET = document.getElementById("target");
AddEventListenersForElement(EVENT, DragleaveEvent, false, TARGET);
}
</script>
</head>
<body>
<pre>Description: Fire dragleave event during the drag and drop processing</pre>
<table id='testtable' border='1'>
<tr>
<td>Test Result</td>
<td>Test Assertion</td>
</tr>
<tr>
<td id='test_result'>Manual</td>
<td id='test_assertion'>Test passes if if the word "PASS" appears to the left after following the steps below.
<div id="manualsteps">
Steps:
<ol>
<li> Select the text inside the red box
<li> Drag it over the blue box and drop it on the green box
</ol>
</div>
</td>
</tr>
</table>
<p>
http://dev.w3.org/html5/spec/dnd.html#drag-and-drop-processing-model
</p>
<p>
If there is a change in the current target element, and if the previous target element was not null or a part of a non-DOM document, then fire a DND event named dragleave at the previous target element.
</p>
<div style="border:2px red solid; width:100px">SampleText</div>
<br />
<div id="target" style="border:2px blue solid; width:200px; height:50px"></div>
<br />
<input type="text" style="border:2px green solid; width:200px; height:50px"></input>
</body>
</html>

View file

@ -1,64 +0,0 @@
<!doctype html>
<html>
<head>
<title>HTML5 Drag and Drop: Fire dragover event during the drag and drop processing</title>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/"/>
<link rel="help" href="http://dev.w3.org/html5/spec/dnd.html#drag-and-drop-processing-model"/>
<meta name="assert" content="Fire dragover event during the drag and drop processing"/>
<script src="dragdrop_support.js" type="text/javascript"></script>
<script type="text/javascript">
var EVENT, TARGET;
function DragoverEvent(evt)
{
if ((TARGET == evt.target) && (EVENT == evt.type))
{
LogTestResult("PASS");
}
else
{
LogTestResult("FAIL");
}
}
EVENT = "dragover";
window.onload = function()
{
TARGET = document.getElementById("target");
AddEventListenersForElement(EVENT, DragoverEvent, false, TARGET);
}
</script>
</head>
<body>
<pre>Description: Fire dragover event during the drag and drop processing</pre>
<table id='testtable' border='1'>
<tr>
<td>Test Result</td>
<td>Test Assertion</td>
</tr>
<tr>
<td id='test_result'>Manual</td>
<td id='test_assertion'>Test passes if if the word "PASS" appears to the left after following the steps below.
<div id="manualsteps">
Steps:
<ol>
<li> Select the text inside the red box.
<li> Drag it, hover over the green box and then release the mouse
</ol>
</div>
</td>
</tr>
</table>
<p>
http://dev.w3.org/html5/spec/dnd.html#drag-and-drop-processing-model
</p>
<p>
If the current target element is a DOM element, then fire a DND event named dragover at this current target element
</p>
<div style="border:2px red solid; width:100px">SampleText</div>
<br /><br />
<div id="target" style="border:2px green solid; width:200px; height:100px"></div>
</body>
</html>

View file

@ -1,62 +0,0 @@
<!doctype html>
<html>
<head>
<title>HTML5 Drag and Drop: Fire dragstart event during the drag and drop processing</title>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/"/>
<link rel="help" href="http://dev.w3.org/html5/spec/dnd.html#drag-and-drop-processing-model"/>
<meta name="assert" content="Fire dragstart event during the drag and drop processing"/>
<script src="dragdrop_support.js" type="text/javascript"></script>
<script type="text/javascript">
var EVENT, TARGET;
function DragstartEvent(evt)
{
if ((TARGET == evt.target) && (EVENT == evt.type))
{
LogTestResult("PASS");
}
else
{
LogTestResult("FAIL");
}
}
EVENT = "dragstart";
window.onload = function()
{
TARGET = document.getElementById("target");
AddEventListenersForElement(EVENT, DragstartEvent, false, TARGET);
}
</script>
</head>
<body>
<pre>Description: Fire dragstart event during the drag and drop processing</pre>
<table id='testtable' border='1'>
<tr>
<td>Test Result</td>
<td>Test Assertion</td>
</tr>
<tr>
<td id='test_result'>Manual</td>
<td id='test_assertion'>Test passes if if the word "PASS" appears to the left after following the steps below.
<div id="manualsteps">
Steps:
<ol>
<li> Click and drag the red box
</ol>
</div>
</td>
</tr>
</table>
<p>
http://dev.w3.org/html5/spec/dnd.html#drag-and-drop-processing-model
</p>
<p>
If it is an element that is being dragged, then set the drag data store elements list to contain just the source node.
Fire a DND event named dragstart at the source node.
</p>
<div id="target" style="border:2px red solid; width:200px; height:50px" draggable="true"></div>
</body>
</html>

View file

@ -1,64 +0,0 @@
<!doctype html>
<html>
<head>
<title>HTML5 Drag and Drop: Fire drop event during the drag and drop processing</title>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/"/>
<link rel="help" href="http://dev.w3.org/html5/spec/dnd.html#drag-and-drop-processing-model"/>
<meta name="assert" content="Fire drop event during the drag and drop processing"/>
<script src="dragdrop_support.js" type="text/javascript"></script>
<script type="text/javascript">
var EVENT, TARGET;
function DropEvent(evt)
{
if ((TARGET == evt.target) && (EVENT == evt.type))
{
LogTestResult("PASS");
}
else
{
LogTestResult("FAIL");
}
}
EVENT = "drop";
window.onload = function()
{
TARGET = document.getElementById("target");
AddEventListenersForElement(EVENT, DropEvent, false, TARGET);
}
</script>
</head>
<body>
<pre>Description: Fire drop event during the drag and drop processing</pre>
<table id='testtable' border='1'>
<tr>
<td>Test Result</td>
<td>Test Assertion</td>
</tr>
<tr>
<td id='test_result'>Manual</td>
<td id='test_assertion'>Test passes if if the word "PASS" appears to the left after following the steps below.
<div id="manualsteps">
Steps:
<ol>
<li> Select the text inside the red box
<li> Drag it and drop it on the green box
</ol>
</div>
</td>
</tr>
</table>
<p>
http://dev.w3.org/html5/spec/dnd.html#drag-and-drop-processing-model
</p>
<p>
If the drag operation was a success, if the current target element is a DOM element, fire a DND event named drop at it.
</p>
<div style="border:2px red solid; width:100px">SampleText</div>
<br /><br />
<input type="text" id="target" style="border:2px green solid; width:200px; height:50px"></input>
</body>
</html>

View file

@ -1,76 +0,0 @@
<!doctype html>
<html>
<head>
<title>HTML5 Drag and Drop: Set a value to effectAllowed attribute</title>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/"/>
<link rel="help" href="http://dev.w3.org/html5/spec/dnd.html#datatransfer"/>
<meta name="assert" content="Set a value to effectAllowed attribute"/>
<script src="dragdrop_support.js" type="text/javascript"></script>
<script type="text/javascript">
var TARGETEVENT1, TARGETEVENT2, TARGET1, TARGET2;
function DragstartEvent(evt)
{
if ((TARGET1 == evt.target) && (TARGETEVENT1 == evt.type))
{
evt.dataTransfer.effectAllowed = "move";
}
}
function DragenterEvent(evt)
{
if ((TARGET2 == evt.target) && (TARGETEVENT2 == evt.type))
{
if("move" == evt.dataTransfer.effectAllowed)
{
LogTestResult("PASS");
}
else
{
LogTestResult("FAIL");
}
}
}
TARGETEVENT1 = "dragstart";
TARGETEVENT2 = "dragenter";
window.onload = function()
{
TARGET1 = document.getElementById("target1");
TARGET2 = document.getElementById("target2");
AddEventListenersForElement(TARGETEVENT1, DragstartEvent, false, TARGET1);
AddEventListenersForElement(TARGETEVENT2, DragenterEvent, false, TARGET2);
}
</script>
</head>
<body>
<pre>Description: Set a value to effectAllowed attribute</pre>
<table id='testtable' border='1'>
<tr>
<td>Test Result</td>
<td>Test Assertion</td>
</tr>
<tr>
<td id='test_result'>Manual</td>
<td id='test_assertion'>Test passes if if the word "PASS" appears to the left after following the steps below.
<div id="manualsteps">
Steps:
<ol>
<li> Drag the blue image and enter the green box
</ol>
</div>
</td>
</tr>
</table>
<p>
http://dev.w3.org/html5/spec/dnd.html#datatransfer
</p>
<p>
On setting, if the new value is one of "none", "copy", "copyLink", "copyMove", "link", "linkMove", "move", "all", or "uninitialized", then the attribute's current value must be set to the new value.
</p>
<img src="/images/blue.png" style="width:200px; height:100px" draggable="true" id="target1"/>
<br /><br />
<input type="text" id="target2" style="border:2px green solid; width:200px; height:50px"></input>
</body>
</html>

View file

@ -1,81 +0,0 @@
<!doctype html>
<html>
<head>
<title>HTML5 Drag and Drop: files attribute returns a FileList</title>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/"/>
<link rel="help" href="http://dev.w3.org/html5/spec/dnd.html#datatransfer"/>
<meta name="assert" content="files attribute returns a FileList"/>
<script src="dragdrop_support.js" type="text/javascript"></script>
<script type="text/javascript">
var EVENT, TARGET;
function DropEvent(evt)
{
if ((TARGET == evt.target) && (EVENT == evt.type))
{
var files = evt.dataTransfer.files;
if(('[object FileList]' == files))
{
LogTestResult("PASS");
}
else
{
LogTestResult("FAIL");
}
}
else
{
LogTestResult("FAIL");
}
}
function DragenterEvent(evt)
{
evt.preventDefault();
}
function DragoverEvent(evt)
{
evt.preventDefault();
}
EVENT = "drop";
window.onload = function()
{
TARGET = document.getElementById("target");
AddEventListenersForElement(EVENT, DropEvent, false, TARGET);
AddEventListenersForElement("dragenter", DragenterEvent, false, TARGET);
AddEventListenersForElement("dragover", DragoverEvent, false, TARGET);
}
</script>
</head>
<body>
<pre>Description: files attribute returns a FileList</pre>
<table id='testtable' border='1'>
<tr>
<td>Test Result</td>
<td>Test Assertion</td>
</tr>
<tr>
<td id='test_result'>Manual</td>
<td id='test_assertion'>Test passes if if the word "PASS" appears to the left after following the steps below.
<div id="manualsteps">
Steps:
<ol>
<li> Drag a file and drop it in the green box
</ol>
</div>
</td>
</tr>
</table>
<p>
http://dev.w3.org/html5/spec/dnd.html#datatransfer
</p>
<p>
The files attribute must return a live FileList sequence consisting of File objects representing the files.
</p>
<textarea type="text" id="target" style="border:2px green solid; width:200px; height:50px"></textarea>
</body>
</html>

View file

@ -1,78 +0,0 @@
<!doctype html>
<html>
<head>
<title>HTML5 Drag and Drop: Add an item to the drag data store item list whose data is the string given by setData method's second argument</title>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/"/>
<link rel="help" href="http://dev.w3.org/html5/spec/dnd.html#datatransfer"/>
<meta name="assert" content="Add an item to the drag data store item list whose data is the string given by setData method's second argument"/>
<script src="dragdrop_support.js" type="text/javascript"></script>
<script type="text/javascript">
var TARGETEVENT1, TARGETEVENT2, TARGET1, TARGET2;
function DragstartEvent(evt)
{
if ((TARGET1 == evt.target) && (TARGETEVENT1 == evt.type))
{
evt.dataTransfer.setData("text", "SetText");
}
}
function DropEvent(evt)
{
if ((TARGET2 == evt.target) && (TARGETEVENT2 == evt.type))
{
if("SetText" == evt.dataTransfer.getData("text"))
{
LogTestResult("PASS");
}
else
{
LogTestResult("FAIL");
}
}
}
TARGETEVENT1 = "dragstart";
TARGETEVENT2 = "drop";
window.onload = function()
{
TARGET1 = document.getElementById("target1");
TARGET2 = document.getElementById("target2");
AddEventListenersForElement(TARGETEVENT1, DragstartEvent, false, TARGET1);
AddEventListenersForElement(TARGETEVENT2, DropEvent, false, TARGET2);
}
</script>
</head>
<body>
<pre>Description: Add an item to the drag data store item list whose data is the string given by setData method's second argument</pre>
<table id='testtable' border='1'>
<tr>
<td>Test Result</td>
<td>Test Assertion</td>
</tr>
<tr>
<td id='test_result'>Manual</td>
<td id='test_assertion'>Test passes if if the word "PASS" appears to the left after following the steps below.
<div id="manualsteps">
Steps:
<ol>
<li> Drag the blue image and drop it in the green box
</ol>
</div>
</td>
</tr>
</table>
<p>
http://dev.w3.org/html5/spec/dnd.html#datatransfer
</p>
<p>
If format equals "text", change it to "text/plain".
Remove the item in the drag data store item list whose kind is Plain Unicode string and whose type string is equal to format, if there is one.
Add an item to the drag data store item list whose kind is Plain Unicode string, whose type string is equal to format, and whose data is the string given by the method's second argument.
</p>
<img src="/images/blue.png" style="width:200px; height:100px" draggable="customValue2" id="target1"/>
<br /><br />
<input type="text" id="target2" style="border:2px green solid; width:200px; height:50px"></input>
</body>
</html>

View file

@ -1,72 +0,0 @@
<!doctype html>
<html>
<head>
<title>HTML5 Drag and Drop: types attribute returns a DOMStringList</title>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/"/>
<link rel="help" href="http://dev.w3.org/html5/spec/dnd.html#datatransfer"/>
<meta name="assert" content="types attribute returns a DOMStringList"/>
<script src="dragdrop_support.js" type="text/javascript"></script>
<script type="text/javascript">
var EVENT, TARGET;
function DropEvent(evt)
{
if ((TARGET == evt.target) && (EVENT == evt.type))
{
var types = evt.dataTransfer.types;
if(('[object DOMStringList]' == types))
{
LogTestResult("PASS");
}
else
{
LogTestResult("FAIL");
}
}
else
{
LogTestResult("FAIL");
}
}
EVENT = "drop";
window.onload = function()
{
TARGET = document.getElementById("target");
AddEventListenersForElement(EVENT, DropEvent, false, TARGET);
}
</script>
</head>
<body>
<pre>Description: types attribute returns a DOMStringList</pre>
<table id='testtable' border='1'>
<tr>
<td>Test Result</td>
<td>Test Assertion</td>
</tr>
<tr>
<td id='test_result'>Manual</td>
<td id='test_assertion'>Test passes if if the word "PASS" appears to the left after following the steps below.
<div id="manualsteps">
Steps:
<ol>
<li> Select the text inside the red box
<li> Drag and drop it in the green box
</ol>
</div>
</td>
</tr>
</table>
<p>
http://dev.w3.org/html5/spec/dnd.html#datatransfer
</p>
<p>
The types attribute must return a live DOMStringList.
</p>
<div style="border:2px red solid; width:200px; height:50px">SampleText</div>
<br /><br />
<input type="text" id="target" style="border:2px green solid; width:200px; height:50px"></input>
</body>
</html>

View file

@ -1,9 +0,0 @@
function AddEventListenersForElement(evt, callback, capture, element)
{
element.addEventListener(evt, callback, capture);
}
function LogTestResult(result)
{
document.getElementById("test_result").firstChild.data = result;
}

View file

@ -1,11 +1,11 @@
<!DOCTYPE html >
<!DOCTYPE html>
<html>
<head>
<title>HTML 5 Foreign Content SVG in HTML </title>
<meta description="Test to verify SVG inside HTML I element parses correctly" />
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<script type="text/javascript">
function RunTest()
{
try
@ -15,7 +15,7 @@
{
var svgNamespace = "http://www.w3.org/2000/svg";
var textElem = document.createElementNS(svgNamespace, "text");
var textContent = document.createTextNode("FillerText");
textElem.appendChild(textContent);
@ -25,7 +25,7 @@
}
}
catch(ex)
{
{
}
}
</script>
@ -38,7 +38,7 @@
</div>
<div>
<i>
<svg id="svg1" width="100px" height="100px">
<svg id="svg1" width="100px" height="100px">
</svg>
</i>
</div>

View file

@ -3,8 +3,8 @@
<head>
<title>HTML 5 Foreign Content SVG in HTML </title>
<meta description="Test to verify SVG elements are styled using SCRIPT and STYLE element" />
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<style>
svg
{
@ -19,7 +19,7 @@
}
</script>
</head>
<body onload="ChangeColor()">
<div class="testdata">

View file

@ -4,48 +4,25 @@
<title>HTML 5 Foreign Content SVG in HTML </title>
<meta description="Test to verify SVG elements inside SVG namespace are camelCased" />
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script type="text/javascript">
function RunTest()
{
try
var parentNode = document.getElementById("svg1");
for(var i=1;i<parentNode.childNodes.length;i=i+2)
{
var bResult = "FAIL";
var parentNode = document.getElementById("svg1");
for(var i=1;i<parentNode.childNodes.length;i=i+2)
{
var idName = parentNode.childNodes[i].id;
var tagName = parentNode.childNodes[i].localName;
if(idName!=tagName)
{
bResult = "FAIL";
break;
}
else
{
bResult = "PASS"
}
}
var idName = parentNode.childNodes[i].id;
var localName = parentNode.childNodes[i].localName;
assert_equals(localName, idName);
}
catch(ex)
{
bResult = "PASS";
}
document.getElementById("testresult").innerHTML = bResult;
}
</script>
</head>
<body onload="RunTest()">
<div class="testdata">
<p id="instructions"> Test passes if the word "PASS" appears below </p>
<p> Test Result : </p>
<p id="testresult"> RUNNING </div>
</div>
<body onload="test(RunTest)">
<svg id="svg1">
<altglyph id="altGlyph" />
@ -88,11 +65,8 @@
<radialgradient id="radialGradient" />
<textpath id="textPath" />
</svg>
</svg>
</body>
</html>

View file

@ -3,51 +3,30 @@
<head>
<title>HTML 5 Foreign Content SVG in HTML </title>
<meta description="Test to verify SVG Elements outside SVG namespace are camelCased" />
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script type="text/javascript">
function RunTest()
{
try
var parentNode = document.getElementById("div1");
for(var i=0;i<parentNode.childNodes.length;i++)
{
var parentNode = document.getElementById("div1");
for(var i=0;i<parentNode.childNodes.length;i++)
{
var idName = parentNode.childNodes[i].id;
var tagName = parentNode.childNodes[i].localName;
if(idName==tagName)
{
document.getElementById("testresult").innerHTML = "FAIL";
break;
}
else
{
document.getElementById("testresult").innerHTML = "PASS";
}
}
}
catch(ex)
{
document.getElementById("testresult").innerHTML = "FAIL";
var idName = parentNode.childNodes[i].id;
var localName = parentNode.childNodes[i].localName;
assert_equals(localName, idName);
}
}
</script>
</head>
<body onload="RunTest()">
<body onload="test(RunTest)">
<div id="div1">
<AlTglYph id="altGlyph" />
</div>
<p id="instructions"> Test passes if the word "PASS" appears below </p>
<p> Test Result : </p>
<div id="testresult"> RUNNING </div>
</div>
</body>
</html>

View file

@ -10,23 +10,23 @@
</head>
<body>
<div id="log"></div>
<!-- Use this iframe to test url changes so that the base url does not change. Their document does not matter. -->
<iframe id="testframe1" style="display:none" src="./404.html"></iframe>
<iframe id="testframe2" style="display:none" src="./404.html"></iframe>
<iframe id="testframe1" style="display:none" src="/common/blank.html"></iframe>
<iframe id="testframe2" style="display:none" src="/common/blank.html"></iframe>
<script type="text/javascript">
var testCollection;
var testIndex = 0;
var testframe1 = document.getElementById("testframe1");
var testframe2 = document.getElementById("testframe2");
setup(function()
{
testCollection = [
function() {
test(function() {
assert_inherits(window, "onpopstate", "window inherits'onpopstate' event ");
assert_own_property(window, "onpopstate", "window has 'onpopstate' own property");
}, "onpopstate in window");
},
function() {
@ -51,7 +51,7 @@
assert_equals(window.history.state, null, "history.state initialized to null");
}, "history.state is initialized to null");
},
function() {
test(function() {
var length = history.length;
@ -59,7 +59,7 @@
assert_equals(history.length, length+1, "history.length should be incremented by one");
}, "history.pushState increments history.length");
},
function() {
var t = async_test("history.pushState clears forward entries");
t.step(function() {
@ -68,15 +68,15 @@
history.pushState(null,null);
history.pushState(null, null);
history.pushState(null, null);
//there should now be three extra
assert_equals(history.length, length+3, "Three additional travel entries add to history.length");
//travel back to the entry that the test started on
history.back();
history.back();
history.back();
//if the back navs are queued, queue verification task after them
queue(
t.step_func(function() {
@ -88,7 +88,7 @@
);
});
},
function() {
test(function() {
testframe1.contentWindow.history.pushState(null,null, "test-pushstate-url");
@ -101,22 +101,22 @@
var pagename = getPageName(oldurl);
//form a new absolute url (with protocol, host, etc) with "absolute-page" as the name of the page
var newurl = oldurl.replace(pagename, "absolute-page");
testframe1.contentWindow.history.pushState(null,null, newurl);
assert_equals(testframe1.contentWindow.location.href, newurl, "iframe1 has the pushed url correctly");
}, "history.pushState's url parameter can be an absolute url");
},
function() {
test(function() {
testframe1.contentWindow.history.pushState(null,null, "multiple-pushstate-url1");
testframe2.contentWindow.history.pushState(null,null, "multiple-pushstate-url2");
assert_equals(getPageName(testframe1.contentWindow.location.href), "multiple-pushstate-url1", "iframe1 has the pushed url");
assert_equals(getPageName(testframe2.contentWindow.location.href), "multiple-pushstate-url2", "iframe2 has the pushed url");
}, "history.pushState can modify location object in multiple frames");
},
function() {
test(function() {
//trigger a security error by replacing the host of the current url with a fake one that is cross-domain
@ -124,14 +124,14 @@
assert_throws("SECURITY_ERR", function() { history.pushState(null, null, testurl); }, "Security_Err 18 should be thrown");
}, "history.pushState throws DOMException with code SECURITY_ERR (18)");
},
function() {
test(function() {
//trigger a data clone error by passing invalid SCA data into the function
assert_throws("DATA_CLONE_ERR", function() { history.pushState(document.body, null); }, "pushState should throw an exception DATA_CLONE_ERR with code 25");
}, "history.pushState throws DATA_CLONE_ERR(25) for bad state parameter");
},
function() {
test(function() {
var length = history.length;
@ -139,7 +139,7 @@
assert_equals(history.length, length, "history.length should not change");
}, "history.replaceState does not increment history.length");
},
function() {
var t = async_test("history.replaceState does not clear forward entries");
t.step(function() {
@ -148,14 +148,14 @@
history.pushState(null,null);
history.pushState(null, null);
history.pushState(null, null);
//there should now be three extra
assert_equals(history.length, length+3, "Three additional travel entries add to history.length");
//travel back two entries to land in the middle
history.back();
history.back();
//if the back navs are queued, queue verification task after them
queue(
t.step_func(function() {
@ -167,7 +167,7 @@
);
});
},
function() {
test(function() {
testframe1.contentWindow.history.replaceState(null,null, "test-replaceState-url");
@ -180,22 +180,22 @@
var pagename = getPageName(oldurl);
//form a new absolute url (with protocol, host, etc) with "absolute-page" as the name of the page
var newurl = oldurl.replace(pagename, "absolute-page");
testframe1.contentWindow.history.replaceState(null,null, newurl);
assert_equals(testframe1.contentWindow.location.href, newurl, "iframe1 has the pushed url correctly");
}, "history.replaceState's url parameter can be an absolute url");
},
function() {
test(function() {
testframe1.contentWindow.history.replaceState(null,null, "multiple-replaceState-url1");
testframe2.contentWindow.history.replaceState(null,null, "multiple-replaceState-url2");
assert_equals(getPageName(testframe1.contentWindow.location.href), "multiple-replaceState-url1", "iframe1 has the pushed url");
assert_equals(getPageName(testframe2.contentWindow.location.href), "multiple-replaceState-url2", "iframe2 has the pushed url");
}, "history.replaceState can modify location object in multiple frames");
},
function() {
test(function() {
//trigger a security error by replacing the host of the current url with a fake one that is cross-domain
@ -203,14 +203,14 @@
assert_throws("SECURITY_ERR", function() { history.replaceState(null, null, testurl); }, "Security_Err 18 should be thrown");
}, "history.replaceState throws DOMException with code SECURITY_ERR (18)");
},
function() {
test(function() {
//trigger a data clone error by passing invalid SCA data into the function
assert_throws("DATA_CLONE_ERR", function() {history.replaceState(document.body, null);}, "replaceState should throw an exception DATA_CLONE_ERR with code 25");
}, "history.replaceState throws DATA_CLONE_ERR(25) for bad state parameter");
},
function() {
var t = async_test("PopStateEvent fires on Back navigation");
t.step(function() {
@ -224,7 +224,7 @@
history.back();
});
},
function() {
var t = async_test("PopStateEvent fires on Forward navigation");
t.step( function() {
@ -245,7 +245,7 @@
);
});
},
function() {
var t = async_test("PopStateEvent receives state data on Back navigation");
t.step(function() {
@ -260,7 +260,7 @@
history.back();
});
},
function() {
test(function() {
history.pushState("pushstate-data", null);
@ -268,7 +268,7 @@
assert_equals(history.state, "pushstate-data", "State data is set correctly");
}, "history.state is set by history.pushState");
},
function() {
test(function() {
history.replaceState("replacestate-data", null);
@ -276,7 +276,7 @@
assert_equals(history.state, "replacestate-data", "State data is set correctly");
}, "history.state is set by history.replaceState");
},
function() {
var t = async_test("history.state changes on navigation");
t.step(function() {
@ -284,7 +284,7 @@
history.pushState("state-back2", null);
//precondition
assert_equals(history.state, "state-back2", "Verify that history.state is set to a second value");
//set up the popstate event to verify that history.state was changed
onpopstate = t.step_func(function(e) {
assert_equals(e.state, "state-back1", "Verify that history.state reverted to the first value");
@ -295,7 +295,7 @@
},
];
}, {explicit_done:true, timeout:8000});
//used to get the name of a page within a path
// to check correctness of url parameter
function getPageName(path) {
@ -320,7 +320,7 @@
//50 allows adequate time for .back and .forward navigations to queue first
setTimeout(func, 50);
}
add_result_callback(testFinished);
//start the first test manually
queue(testCollection[testIndex]);