mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Update web-platform-tests to revision 0d318188757a9c996e20b82db201fd04de5aa255
This commit is contained in:
parent
b2a5225831
commit
1a81b18b9f
12321 changed files with 544385 additions and 6 deletions
|
@ -0,0 +1,45 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='utf-8'>
|
||||
<title>HTML Test: dropzone_attribute</title>
|
||||
<link rel='author' title='Intel' href='http://www.intel.com'>
|
||||
<link rel='help' href='https://html.spec.whatwg.org/multipage/#the-dropzone-attribute'>
|
||||
<meta name="flags" content="may">
|
||||
<script src='/resources/testharness.js'></script>
|
||||
<script src='/resources/testharnessreport.js'></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id='log'> </div>
|
||||
|
||||
<script>
|
||||
var drop_element;
|
||||
|
||||
setup(function() { drop_element = document.createElement('div'); });
|
||||
|
||||
test(function() {
|
||||
//Empty values for elements
|
||||
drop_element.dropzone = '';
|
||||
assert_not_equals(drop_element.dropzone, undefined, 'div.dropzone should not be undefined if it\'s been set');
|
||||
}, 'div.dropzone should not be undefined if it\'s been set');
|
||||
|
||||
test(function() {
|
||||
drop_element.dropzone = null;
|
||||
assert_not_equals(drop_element.dropzone, null, 'div.dropzone should not be null');
|
||||
}, 'div.dropzone should not be null');
|
||||
|
||||
test(function() {
|
||||
//The dropzone IDL attribute must reflect the content attribute of the same name.
|
||||
drop_element.setAttribute('dropzone', 'copy file:image/png file:image/gif file:image/jpeg');
|
||||
assert_equals(drop_element.dropzone, 'copy file:image/png file:image/gif file:image/jpeg', 'div dropzone idl attribute must reflect the content attribute of the same name');
|
||||
}, 'div dropzone idl attribute must reflect the content attribute of the same name');
|
||||
|
||||
test(function() {
|
||||
//The dropzone content attribute is set to the literal value when the idl attribute value is set.
|
||||
drop_element.dropzone = 'copy file:image/png file:image/gif file:image/jpeg';
|
||||
assert_equals(drop_element.getAttribute('dropzone'), 'copy file:image/png file:image/gif file:image/jpeg', 'div dropzone content attribute is set to the literal value');
|
||||
}, 'div dropzone content attribute is set to the literal value');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,45 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='utf-8'>
|
||||
<title>HTML Test: dropzone_attribute_data_item_file_type</title>
|
||||
<link rel='author' title='Intel' href='http://www.intel.com'>
|
||||
<link rel='help' href='https://html.spec.whatwg.org/multipage/#the-dropzone-attribute'>
|
||||
<script src='/resources/testharness.js'></script>
|
||||
<script src='/resources/testharnessreport.js'></script>
|
||||
<style>
|
||||
#drop {
|
||||
border: 2px solid black;
|
||||
width: 160px;
|
||||
height: 160px;
|
||||
padding: 20px;
|
||||
color: white;
|
||||
}
|
||||
img {
|
||||
margin: 20px auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<img src='/images/blue.png' alt='blue image' />
|
||||
<div>Save the blue image (image/png) above to your desktop, drag the image from desktop to the blue text to rectangular box in browser.</div>
|
||||
<div id='drop' dropzone='copy file:image/png'></div>
|
||||
<div id='log'> </div>
|
||||
|
||||
<script>
|
||||
var drop;
|
||||
setup(function() {
|
||||
drop = document.querySelector('#drop');
|
||||
}, {explicit_done: true, explicit_timeout: true});
|
||||
|
||||
on_event(drop, 'drop', function(event) {
|
||||
var item = event.dataTransfer.items[0];
|
||||
test(function() {
|
||||
assert_equals(item.type, 'image/png', 'data item type is "image/png"');
|
||||
}, 'data item type is "image/png"');
|
||||
done();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,45 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='utf-8'>
|
||||
<title>HTML Test: dropzone_attribute_data_item_kind_file</title>
|
||||
<link rel='author' title='Intel' href='http://www.intel.com'>
|
||||
<link rel='help' href='https://html.spec.whatwg.org/multipage/#the-dropzone-attribute'>
|
||||
<script src='/resources/testharness.js'></script>
|
||||
<script src='/resources/testharnessreport.js'></script>
|
||||
<style>
|
||||
#drop {
|
||||
border: 2px solid black;
|
||||
width: 160px;
|
||||
height: 160px;
|
||||
padding: 20px;
|
||||
color: white;
|
||||
}
|
||||
img {
|
||||
margin: 20px auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<img src='/images/blue.png' alt='blue image' />
|
||||
<div>Save the blue image (image/png) above to your desktop, drag the image from desktop to the blue text to rectangular box in browser.</div>
|
||||
<div id='drop' dropzone='copy file:image/png'></div>
|
||||
<div id='log'> </div>
|
||||
|
||||
<script>
|
||||
var drop;
|
||||
setup(function() {
|
||||
drop = document.querySelector('#drop');
|
||||
}, {explicit_done: true, explicit_timeout: true});
|
||||
|
||||
on_event(drop, 'drop', function(event) {
|
||||
var item = event.dataTransfer.items[0];
|
||||
test(function() {
|
||||
assert_equals(item.kind, 'file', 'data item kind is file');
|
||||
}, 'data item kind is file');
|
||||
done();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,45 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='utf-8'>
|
||||
<title>HTML Test: dropzone_attribute_data_item_kind_string</title>
|
||||
<link rel='author' title='Intel' href='http://www.intel.com'>
|
||||
<link rel='help' href='https://html.spec.whatwg.org/multipage/#the-dropzone-attribute'>
|
||||
<script src='/resources/testharness.js'></script>
|
||||
<script src='/resources/testharnessreport.js'></script>
|
||||
<style>
|
||||
#drop {
|
||||
border: 2px solid black;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
padding: 20px;
|
||||
}
|
||||
#select {
|
||||
color: blue;
|
||||
margin: 20px auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div>Select and drag the blue text to rectangular box.</div>
|
||||
<div id='select' draggable>blue text</div>
|
||||
<div id='drop' dropzone='copy string:text/plain'></div>
|
||||
<div id='log'> </div>
|
||||
|
||||
<script>
|
||||
var drop;
|
||||
setup(function() {
|
||||
drop = document.querySelector('#drop');
|
||||
}, {explicit_done: true, explicit_timeout: true});
|
||||
|
||||
on_event(drop, 'drop', function(event) {
|
||||
var item = event.dataTransfer.items[0];
|
||||
test(function() {
|
||||
assert_equals(item.kind, 'string', 'data item kind is string');
|
||||
}, 'data item kind is string');
|
||||
done();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,45 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='utf-8'>
|
||||
<title>HTML Test: dropzone_attribute_data_item_string_type</title>
|
||||
<link rel='author' title='Intel' href='http://www.intel.com'>
|
||||
<link rel='help' href='https://html.spec.whatwg.org/multipage/#the-dropzone-attribute'>
|
||||
<script src='/resources/testharness.js'></script>
|
||||
<script src='/resources/testharnessreport.js'></script>
|
||||
<style>
|
||||
#drop {
|
||||
border: 2px solid black;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
padding: 20px;
|
||||
}
|
||||
#select {
|
||||
color: blue;
|
||||
margin: 20px auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div>Select and drag the blue text to rectangular box.</div>
|
||||
<div id='select' draggable>blue text</div>
|
||||
<div id='drop' dropzone='copy string:text/plain'></div>
|
||||
<div id='log'> </div>
|
||||
|
||||
<script>
|
||||
var drop;
|
||||
setup(function() {
|
||||
drop = document.querySelector('#drop');
|
||||
}, {explicit_done: true, explicit_timeout: true});
|
||||
|
||||
on_event(drop, 'drop', function(event) {
|
||||
var item = event.dataTransfer.items[0];
|
||||
test(function() {
|
||||
assert_equals(item.type, 'text/plain', 'data item type is "text/plain"');
|
||||
}, 'data item type is "text/plain"');
|
||||
done();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,51 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='utf-8'>
|
||||
<title>HTML Test: dropzone_attribute_inputbox_element</title>
|
||||
<link rel='author' title='Intel' href='http://www.intel.com'>
|
||||
<link rel='help' href='https://html.spec.whatwg.org/multipage/#the-dropzone-attribute'>
|
||||
<script src='/resources/testharness.js'></script>
|
||||
<script src='/resources/testharnessreport.js'></script>
|
||||
<style>
|
||||
#drop {
|
||||
border: 2px solid black;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
padding: 20px;
|
||||
}
|
||||
input {
|
||||
color: blue;
|
||||
margin: 20px auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div>Select all the inputbox text then drag to rectangular box.</div>
|
||||
<input draggable='true' type='text' value='hello world'></input>
|
||||
<div id='drop' dropzone='move string:text/plain'></div>
|
||||
<div id='log'> </div>
|
||||
|
||||
<script>
|
||||
var drop;
|
||||
setup(function() {
|
||||
drop = document.querySelector('#drop');
|
||||
}, {explicit_done: true, explicit_timeout: true});
|
||||
|
||||
on_event(drop, 'drop', function(event) {
|
||||
|
||||
test(function() {
|
||||
assert_equals(event.dataTransfer.dropEffect, 'move', 'dropzone content attribute value is "move"');
|
||||
}, 'dropzone content attribute value is "move"');
|
||||
|
||||
test(function() {
|
||||
var item = event.dataTransfer.items[0];
|
||||
assert_equals(event.dataTransfer.getData(item.type), 'hello world', 'The dropped string value is the inputbox text you selected.');
|
||||
}, 'The dropped string value is the inputbox text you selected.');
|
||||
|
||||
done();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,46 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='utf-8'>
|
||||
<title>HTML Test: dropzone_attribute_inputbox_element_dbcs</title>
|
||||
<link rel='author' title='Intel' href='http://www.intel.com'>
|
||||
<link rel='help' href='https://html.spec.whatwg.org/multipage/#the-dropzone-attribute'>
|
||||
<script src='/resources/testharness.js'></script>
|
||||
<script src='/resources/testharnessreport.js'></script>
|
||||
<style>
|
||||
#drop {
|
||||
border: 2px solid black;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
padding: 20px;
|
||||
}
|
||||
input {
|
||||
color: blue;
|
||||
margin: 20px auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div>Select all the inputbox DBCS (Double Byte Character Set) text then drag to rectangular box.</div>
|
||||
<input draggable='true' type='text' value='您好,互联网。'></input>
|
||||
<div id='drop' dropzone='move string:text/plain'></div>
|
||||
<div id='log'> </div>
|
||||
|
||||
<script>
|
||||
var drop;
|
||||
setup(function() {
|
||||
drop = document.querySelector('#drop');
|
||||
}, {explicit_done: true, explicit_timeout: true});
|
||||
|
||||
on_event(drop, 'drop', function(event) {
|
||||
test(function() {
|
||||
var item = item = event.dataTransfer.items[0];
|
||||
assert_equals(event.dataTransfer.getData(item.type), '您好,互联网。', 'The dropped string value is the inputbox text you selected.');
|
||||
}, 'The dropped string value is the inputbox text you selected.');
|
||||
|
||||
done();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,48 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='utf-8'>
|
||||
<title>HTML Test: dropzone_attribute_element_link</title>
|
||||
<link rel='author' title='Intel' href='http://www.intel.com'>
|
||||
<link rel='help' href='https://html.spec.whatwg.org/multipage/#the-dropzone-attribute'>
|
||||
<script src='/resources/testharness.js'></script>
|
||||
<script src='/resources/testharnessreport.js'></script>
|
||||
<style>
|
||||
#drop {
|
||||
border: 2px solid black;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
padding: 20px;
|
||||
}
|
||||
div { margin: 20px 0px;}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div>Select and drag the all the text of link below to rectangular box.</div>
|
||||
<a href="http://w3.org" title="World Wide Web Consortium">w3.org</a>
|
||||
<div id='drop' dropzone='link string:text/plain'></div>
|
||||
<div id='log'> </div>
|
||||
|
||||
<script>
|
||||
var drop;
|
||||
setup(function() {
|
||||
drop = document.querySelector('#drop');
|
||||
}, {explicit_done: true, explicit_timeout: true});
|
||||
|
||||
on_event(drop, 'drop', function(event) {
|
||||
|
||||
test(function() {
|
||||
assert_equals(event.dataTransfer.dropEffect, 'link', 'dropzone content attribute value is "link"');
|
||||
}, 'dropzone content attribute value is "link"');
|
||||
|
||||
test(function() {
|
||||
var item = item = event.dataTransfer.items[0];
|
||||
assert_equals(event.dataTransfer.getData(item.type), 'w3.org', 'The dropped link value is "w3.org"');
|
||||
}, 'The dropped link value is "w3.org"');
|
||||
|
||||
done();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,45 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='utf-8'>
|
||||
<title>HTML Test: dropzone_attribute_value_case_insensitive_COpy</title>
|
||||
<link rel='author' title='Intel' href='http://www.intel.com'>
|
||||
<link rel='help' href='https://html.spec.whatwg.org/multipage/#the-dropzone-attribute'>
|
||||
<script src='/resources/testharness.js'></script>
|
||||
<script src='/resources/testharnessreport.js'></script>
|
||||
<style>
|
||||
#drop {
|
||||
border: 2px solid black;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
padding: 20px;
|
||||
}
|
||||
#select {
|
||||
color: blue;
|
||||
margin: 20px auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div>Select and drag the blue text to rectangular box.</div>
|
||||
<div id='select' draggable>blue text</div>
|
||||
<div id='drop' dropzone='COpy string:text/plain'></div>
|
||||
<div id='log'> </div>
|
||||
|
||||
<script>
|
||||
var drop;
|
||||
setup(function() {
|
||||
drop = document.querySelector('#drop');
|
||||
}, {explicit_done: true, explicit_timeout: true});
|
||||
|
||||
on_event(drop, 'drop', function(event) {
|
||||
test(function() {
|
||||
assert_equals(event.dataTransfer.dropEffect, 'copy', 'dropzone content attribute value is case insensitive_COpy');
|
||||
}, 'dropzone content attribute value is case insensitive_COpy');
|
||||
|
||||
done();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,45 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='utf-8'>
|
||||
<title>HTML Test: dropzone_attribute_value_case_insensitive_STRING</title>
|
||||
<link rel='author' title='Intel' href='http://www.intel.com'>
|
||||
<link rel='help' href='https://html.spec.whatwg.org/multipage/#the-dropzone-attribute'>
|
||||
<script src='/resources/testharness.js'></script>
|
||||
<script src='/resources/testharnessreport.js'></script>
|
||||
<style>
|
||||
#drop {
|
||||
border: 2px solid black;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
padding: 20px;
|
||||
}
|
||||
#select {
|
||||
color: blue;
|
||||
margin: 20px auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div>Select and drag the blue text to rectangular box.</div>
|
||||
<div id='select' draggable>blue text</div>
|
||||
<div id='drop' dropzone='copy STRING:text/plain'></div>
|
||||
<div id='log'> </div>
|
||||
|
||||
<script>
|
||||
var drop;
|
||||
setup(function() {
|
||||
drop = document.querySelector('#drop');
|
||||
}, {explicit_done: true, explicit_timeout: true});
|
||||
|
||||
on_event(drop, 'drop', function(event) {
|
||||
test(function() {
|
||||
assert_equals(event.dataTransfer.dropEffect, 'copy', 'dropzone content attribute value is case insensitive_STRING');
|
||||
}, 'dropzone content attribute value is case insensitive_STRING');
|
||||
|
||||
done();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,45 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='utf-8'>
|
||||
<title>HTML Test: dropzone_attribute_value_case_insensitive_String</title>
|
||||
<link rel='author' title='Intel' href='http://www.intel.com'>
|
||||
<link rel='help' href='https://html.spec.whatwg.org/multipage/#the-dropzone-attribute'>
|
||||
<script src='/resources/testharness.js'></script>
|
||||
<script src='/resources/testharnessreport.js'></script>
|
||||
<style>
|
||||
#drop {
|
||||
border: 2px solid black;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
padding: 20px;
|
||||
}
|
||||
#select {
|
||||
color: blue;
|
||||
margin: 20px auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div>Select and drag the blue text to rectangular box.</div>
|
||||
<div id='select' draggable>blue text</div>
|
||||
<div id='drop' dropzone='link String:text/plain'></div>
|
||||
<div id='log'> </div>
|
||||
|
||||
<script>
|
||||
var drop;
|
||||
setup(function() {
|
||||
drop = document.querySelector('#drop');
|
||||
}, {explicit_done: true, explicit_timeout: true});
|
||||
|
||||
on_event(drop, 'drop', function(event) {
|
||||
test(function() {
|
||||
assert_equals(event.dataTransfer.dropEffect, 'link', 'dropzone content attribute value is case insensitive_String');
|
||||
}, 'dropzone content attribute value is case insensitive_String');
|
||||
|
||||
done();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,45 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='utf-8'>
|
||||
<title>HTML Test: dropzone_attribute_value_case_insensitive_linK</title>
|
||||
<link rel='author' title='Intel' href='http://www.intel.com'>
|
||||
<link rel='help' href='https://html.spec.whatwg.org/multipage/#the-dropzone-attribute'>
|
||||
<script src='/resources/testharness.js'></script>
|
||||
<script src='/resources/testharnessreport.js'></script>
|
||||
<style>
|
||||
#drop {
|
||||
border: 2px solid black;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
padding: 20px;
|
||||
}
|
||||
#select {
|
||||
color: blue;
|
||||
margin: 20px auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div>Select and drag the blue text to rectangular box.</div>
|
||||
<div id='select' draggable>blue text</div>
|
||||
<div id='drop' dropzone='liNK string:text/plain'></div>
|
||||
<div id='log'> </div>
|
||||
|
||||
<script>
|
||||
var drop;
|
||||
setup(function() {
|
||||
drop = document.querySelector('#drop');
|
||||
}, {explicit_done: true, explicit_timeout: true});
|
||||
|
||||
on_event(drop, 'drop', function(event) {
|
||||
test(function() {
|
||||
assert_equals(event.dataTransfer.dropEffect, 'link', 'dropzone content attribute value is case insensitive_linK');
|
||||
}, 'dropzone content attribute value is case insensitive_linK');
|
||||
|
||||
done();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,45 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='utf-8'>
|
||||
<title>HTML Test: dropzone_attribute_value_copy</title>
|
||||
<link rel='author' title='Intel' href='http://www.intel.com'>
|
||||
<link rel='help' href='https://html.spec.whatwg.org/multipage/#the-dropzone-attribute'>
|
||||
<script src='/resources/testharness.js'></script>
|
||||
<script src='/resources/testharnessreport.js'></script>
|
||||
<style>
|
||||
#drop {
|
||||
border: 2px solid black;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
padding: 20px;
|
||||
}
|
||||
#select {
|
||||
color: blue;
|
||||
margin: 20px auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div>Select and drag the blue text to rectangular box.</div>
|
||||
<div id='select' draggable>blue text</div>
|
||||
<div id='drop' dropzone='copy string:text/plain'></div>
|
||||
<div id='log'> </div>
|
||||
|
||||
<script>
|
||||
var drop;
|
||||
setup(function() {
|
||||
drop = document.querySelector('#drop');
|
||||
}, {explicit_done: true, explicit_timeout: true});
|
||||
|
||||
on_event(drop, 'drop', function(event) {
|
||||
test(function() {
|
||||
assert_equals(event.dataTransfer.dropEffect, 'copy', 'dropzone content attribute value is "copy"');
|
||||
}, 'dropzone content attribute value is "copy"');
|
||||
|
||||
done();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,45 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='utf-8'>
|
||||
<title>HTML Test: dropzone_attribute_value_foo</title>
|
||||
<link rel='author' title='Intel' href='http://www.intel.com'>
|
||||
<link rel='help' href='https://html.spec.whatwg.org/multipage/#the-dropzone-attribute'>
|
||||
<script src='/resources/testharness.js'></script>
|
||||
<script src='/resources/testharnessreport.js'></script>
|
||||
<style>
|
||||
#drop {
|
||||
border: 2px solid black;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
padding: 20px;
|
||||
}
|
||||
#select {
|
||||
color: blue;
|
||||
margin: 20px auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div>Select and drag the blue text to rectangular box.</div>
|
||||
<div id='select' draggable>blue text</div>
|
||||
<div id='drop' dropzone='foo string:text/plain'></div>
|
||||
<div id='log'> </div>
|
||||
|
||||
<script>
|
||||
var drop;
|
||||
setup(function() {
|
||||
drop = document.querySelector('#drop');
|
||||
}, {explicit_done: true, explicit_timeout: true});
|
||||
|
||||
on_event(drop, 'drop', function(event) {
|
||||
test(function() {
|
||||
assert_equals(event.dataTransfer.dropEffect, 'copy', 'dropzone content attribute value is "copy" if it\'s not one of three feedback values (copy, move, and link) specified');
|
||||
}, 'dropzone content attribute value is "copy" if it\'s not one of three feedback values (copy, move, and link) specified');
|
||||
|
||||
done();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,45 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='utf-8'>
|
||||
<title>HTML Test: dropzone_attribute_value_link</title>
|
||||
<link rel='author' title='Intel' href='http://www.intel.com'>
|
||||
<link rel='help' href='https://html.spec.whatwg.org/multipage/#the-dropzone-attribute'>
|
||||
<script src='/resources/testharness.js'></script>
|
||||
<script src='/resources/testharnessreport.js'></script>
|
||||
<style>
|
||||
#drop {
|
||||
border: 2px solid black;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
padding: 20px;
|
||||
}
|
||||
#select {
|
||||
color: blue;
|
||||
margin: 20px auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div>Select and drag the blue text to rectangular box.</div>
|
||||
<div id='select' draggable>blue text</div>
|
||||
<div id='drop' dropzone='link string:text/plain'></div>
|
||||
<div id='log'> </div>
|
||||
|
||||
<script>
|
||||
var drop;
|
||||
setup(function() {
|
||||
drop = document.querySelector('#drop');
|
||||
}, {explicit_done: true, explicit_timeout: true});
|
||||
|
||||
on_event(drop, 'drop', function(event) {
|
||||
test(function() {
|
||||
assert_equals(event.dataTransfer.dropEffect, 'link', 'dropzone content attribute value is "link"');
|
||||
}, 'dropzone content attribute value is "link"');
|
||||
|
||||
done();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,45 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='utf-8'>
|
||||
<title>HTML Test: dropzone_attribute_value_move</title>
|
||||
<link rel='author' title='Intel' href='http://www.intel.com'>
|
||||
<link rel='help' href='https://html.spec.whatwg.org/multipage/#the-dropzone-attribute'>
|
||||
<script src='/resources/testharness.js'></script>
|
||||
<script src='/resources/testharnessreport.js'></script>
|
||||
<style>
|
||||
#drop {
|
||||
border: 2px solid black;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
padding: 20px;
|
||||
}
|
||||
#select {
|
||||
color: blue;
|
||||
margin: 20px auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div>Select and drag the blue text to rectangular box.</div>
|
||||
<div id='select' draggable>blue text</div>
|
||||
<div id='drop' dropzone='move string:text/plain'></div>
|
||||
<div id='log'> </div>
|
||||
|
||||
<script>
|
||||
var drop;
|
||||
setup(function() {
|
||||
drop = document.querySelector('#drop');
|
||||
}, {explicit_done: true, explicit_timeout: true});
|
||||
|
||||
on_event(drop, 'drop', function(event) {
|
||||
test(function() {
|
||||
assert_equals(event.dataTransfer.dropEffect, 'move', 'dropzone content attribute value is "move"');
|
||||
}, 'dropzone content attribute value is "move"');
|
||||
|
||||
done();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,45 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='utf-8'>
|
||||
<title>HTML Test: dropzone_attribute_value_multiple_values_foo_bar_move</title>
|
||||
<link rel='author' title='Intel' href='http://www.intel.com'>
|
||||
<link rel='help' href='https://html.spec.whatwg.org/multipage/#the-dropzone-attribute'>
|
||||
<script src='/resources/testharness.js'></script>
|
||||
<script src='/resources/testharnessreport.js'></script>
|
||||
<style>
|
||||
#drop {
|
||||
border: 2px solid black;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
padding: 20px;
|
||||
}
|
||||
#select {
|
||||
color: blue;
|
||||
margin: 20px auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div>Select and drag the blue text to rectangular box.</div>
|
||||
<div id='select' draggable>blue text</div>
|
||||
<div id='drop' dropzone='foo bar move string:text/plain'></div>
|
||||
<div id='log'> </div>
|
||||
|
||||
<script>
|
||||
var drop;
|
||||
setup(function() {
|
||||
drop = document.querySelector('#drop');
|
||||
}, {explicit_done: true, explicit_timeout: true});
|
||||
|
||||
on_event(drop, 'drop', function(event) {
|
||||
test(function() {
|
||||
assert_equals(event.dataTransfer.dropEffect, 'move', 'dropzone content attribute value is the first matched value of "foo bar move"');
|
||||
}, 'dropzone content attribute value is the first matched value of "foo bar move"');
|
||||
|
||||
done();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,45 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='utf-8'>
|
||||
<title>HTML Test: dropzone_attribute_value_multiple_values_foo_link</title>
|
||||
<link rel='author' title='Intel' href='http://www.intel.com'>
|
||||
<link rel='help' href='https://html.spec.whatwg.org/multipage/#the-dropzone-attribute'>
|
||||
<script src='/resources/testharness.js'></script>
|
||||
<script src='/resources/testharnessreport.js'></script>
|
||||
<style>
|
||||
#drop {
|
||||
border: 2px solid black;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
padding: 20px;
|
||||
}
|
||||
#select {
|
||||
color: blue;
|
||||
margin: 20px auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div>Select and drag the blue text to rectangular box.</div>
|
||||
<div id='select' draggable>blue text</div>
|
||||
<div id='drop' dropzone='foo link string:text/plain'></div>
|
||||
<div id='log'> </div>
|
||||
|
||||
<script>
|
||||
var drop;
|
||||
setup(function() {
|
||||
drop = document.querySelector('#drop');
|
||||
}, {explicit_done: true, explicit_timeout: true});
|
||||
|
||||
on_event(drop, 'drop', function(event) {
|
||||
test(function() {
|
||||
assert_equals(event.dataTransfer.dropEffect, 'link', 'dropzone content attribute value is the first matched value of "foo link"');
|
||||
}, 'dropzone content attribute value is the first matched value of "foo link"');
|
||||
|
||||
done();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,45 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='utf-8'>
|
||||
<title>HTML Test: dropzone_attribute_value_multiple_values_move_copy</title>
|
||||
<link rel='author' title='Intel' href='http://www.intel.com'>
|
||||
<link rel='help' href='https://html.spec.whatwg.org/multipage/#the-dropzone-attribute'>
|
||||
<script src='/resources/testharness.js'></script>
|
||||
<script src='/resources/testharnessreport.js'></script>
|
||||
<style>
|
||||
#drop {
|
||||
border: 2px solid black;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
padding: 20px;
|
||||
}
|
||||
#select {
|
||||
color: blue;
|
||||
margin: 20px auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div>Select and drag the blue text to rectangular box.</div>
|
||||
<div id='select' draggable>blue text</div>
|
||||
<div id='drop' dropzone='move copy string:text/plain'></div>
|
||||
<div id='log'> </div>
|
||||
|
||||
<script>
|
||||
var drop;
|
||||
setup(function() {
|
||||
drop = document.querySelector('#drop');
|
||||
}, {explicit_done: true, explicit_timeout: true});
|
||||
|
||||
on_event(drop, 'drop', function(event) {
|
||||
test(function() {
|
||||
assert_equals(event.dataTransfer.dropEffect, 'move', 'dropzone content attribute value is the first matched value of "move copy"');
|
||||
}, 'dropzone content attribute value is the first matched value of "move copy"');
|
||||
|
||||
done();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,45 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='utf-8'>
|
||||
<title>HTML Test: dropzone_attribute_value_not_specified</title>
|
||||
<link rel='author' title='Intel' href='http://www.intel.com'>
|
||||
<link rel='help' href='https://html.spec.whatwg.org/multipage/#the-dropzone-attribute'>
|
||||
<script src='/resources/testharness.js'></script>
|
||||
<script src='/resources/testharnessreport.js'></script>
|
||||
<style>
|
||||
#drop {
|
||||
border: 2px solid black;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
padding: 20px;
|
||||
}
|
||||
#select {
|
||||
color: blue;
|
||||
margin: 20px auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div>Select and drag the blue text to rectangular box.</div>
|
||||
<div id='select' draggable>blue text</div>
|
||||
<div id='drop' dropzone='string:text/plain'></div>
|
||||
<div id='log'> </div>
|
||||
|
||||
<script>
|
||||
var drop;
|
||||
setup(function() {
|
||||
drop = document.querySelector('#drop');
|
||||
}, {explicit_done: true, explicit_timeout: true});
|
||||
|
||||
on_event(drop, 'drop', function(event) {
|
||||
test(function() {
|
||||
assert_equals(event.dataTransfer.dropEffect, 'copy', 'dropzone content attribute value is "copy" if it\'s not specified');
|
||||
}, 'dropzone content attribute value is "copy" if it\'s not specified');
|
||||
|
||||
done();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,53 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='utf-8'>
|
||||
<title>HTML Test: dropzone_attribute_value_unordered_unique_space_separated</title>
|
||||
<link rel='author' title='Intel' href='http://www.intel.com'>
|
||||
<link rel='help' href='https://html.spec.whatwg.org/multipage/#the-dropzone-attribute'>
|
||||
<script src='/resources/testharness.js'></script>
|
||||
<script src='/resources/testharnessreport.js'></script>
|
||||
<style>
|
||||
#drop {
|
||||
border: 2px solid black;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
padding: 20px;
|
||||
}
|
||||
#select {
|
||||
color: blue;
|
||||
margin: 20px auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div>Select and drag the blue text to rectangular box.</div>
|
||||
<div id='select' draggable>blue text</div>
|
||||
<div id='drop' dropzone='string:text/plain copy'></div>
|
||||
<div id='log'> </div>
|
||||
|
||||
<script>
|
||||
var drop;
|
||||
setup(function() {
|
||||
drop = document.querySelector('#drop');
|
||||
}, {explicit_done: true, explicit_timeout: true});
|
||||
|
||||
on_event(drop, 'drop', function(event) {
|
||||
|
||||
test(function() {
|
||||
assert_equals(event.dataTransfer.dropEffect, 'copy', 'unordered_unique_space_separated "string:text/plain copy", drop effect is copy');
|
||||
}, 'dropzone content attribute value is unordered_unique_space_separated "string:text/plain copy", drop effect is copy');
|
||||
test(function() {
|
||||
item = event.dataTransfer.items[0];
|
||||
assert_equals(item.kind, 'string', 'unordered_unique_space_separated "string:text/plain copy", data item kind is string');
|
||||
}, 'dropzone content attribute value is unordered_unique_space_separated "string:text/plain copy", data item kind is string');
|
||||
test(function() {
|
||||
item = event.dataTransfer.items[0];
|
||||
assert_equals(item.type, 'text/plain', 'dropzone content attribute value is unordered_unique_space_separated "string:text/plain copy", data item type is "text/plain"');
|
||||
}, 'dropzone content attribute value is unordered_unique_space_separated "string:text/plain copy", data item type is "text/plain"');
|
||||
done();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue