!define HTML { {{{
<!DOCTYPE HTML>
<html>
<head>
<style>
#div1 {
  width: 350px;
  height: 70px;
  padding: 10px;
  border: 1px solid #aaaaaa;
}
</style>
<script>
function allowDrop(ev) {
  ev.preventDefault();
}
function drag(ev) {
  ev.dataTransfer.setData("text", ev.target.id);
}
function drop(ev) {
  ev.preventDefault();
  var data = ev.dataTransfer.getData("text");
  ev.target.appendChild(document.getElementById(data));
}
</script>
</head>
<body>
<div id="div1" ondrop="drop(event)" ondragover="allowDrop(event)"></div>
<br>
<div id="drag1" draggable="true" ondragstart="drag(event)">drag me!</div>
</body>
</html>
}}} }

|script      |mock xml server setup|
|add response|${HTML}              |
|add response|${HTML}              |
|$url=       |get mock server url  |

|script                |browser test                        |
|open                  |$url                                |
|seconds before timeout|1                                   |
|check                 |normalized value of|id=div1|!--!    |
|html5 drag and drop   |id=drag1           |to     |id=div1 |
|check                 |normalized value of|id=div1|drag me!|

Drag and drop will use the html5 version automatically if the source element has the attribute !style_code[draggable] with value !style_code[true]:

|script                                                     |
|refresh                                                    |
|seconds before timeout|1                                   |
|check                 |normalized value of|id=div1|!--!    |
|drag and drop         |id=drag1           |to     |id=div1 |
|check                 |normalized value of|id=div1|drag me!|