diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute')
21 files changed, 963 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute.html b/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute.html new file mode 100644 index 000000000..feb73eccf --- /dev/null +++ b/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute.html @@ -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> diff --git a/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_data_item_file_type-manual.html b/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_data_item_file_type-manual.html new file mode 100644 index 000000000..9027559dc --- /dev/null +++ b/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_data_item_file_type-manual.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> diff --git a/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_data_item_kind_file-manual.html b/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_data_item_kind_file-manual.html new file mode 100644 index 000000000..7a77c1241 --- /dev/null +++ b/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_data_item_kind_file-manual.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> diff --git a/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_data_item_kind_string-manual.html b/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_data_item_kind_string-manual.html new file mode 100644 index 000000000..b8a22e613 --- /dev/null +++ b/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_data_item_kind_string-manual.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> diff --git a/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_data_item_string_type-manual.html b/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_data_item_string_type-manual.html new file mode 100644 index 000000000..7a5dccf4e --- /dev/null +++ b/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_data_item_string_type-manual.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> diff --git a/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_inputbox_element-manual.html b/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_inputbox_element-manual.html new file mode 100644 index 000000000..f80604afa --- /dev/null +++ b/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_inputbox_element-manual.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> diff --git a/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_inputbox_element_dbcs-manual.html b/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_inputbox_element_dbcs-manual.html new file mode 100644 index 000000000..a7f8ad1aa --- /dev/null +++ b/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_inputbox_element_dbcs-manual.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> diff --git a/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_link_element-manual.html b/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_link_element-manual.html new file mode 100644 index 000000000..c6e5756ad --- /dev/null +++ b/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_link_element-manual.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> diff --git a/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_case_insensitive_COpy-manual.html b/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_case_insensitive_COpy-manual.html new file mode 100644 index 000000000..17ec7a36a --- /dev/null +++ b/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_case_insensitive_COpy-manual.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> diff --git a/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_case_insensitive_STRING-manual.html b/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_case_insensitive_STRING-manual.html new file mode 100644 index 000000000..f118ba00b --- /dev/null +++ b/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_case_insensitive_STRING-manual.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> diff --git a/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_case_insensitive_String_-manual.html b/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_case_insensitive_String_-manual.html new file mode 100644 index 000000000..9b8480380 --- /dev/null +++ b/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_case_insensitive_String_-manual.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> diff --git a/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_case_insensitive_linK-manual.html b/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_case_insensitive_linK-manual.html new file mode 100644 index 000000000..e4364db73 --- /dev/null +++ b/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_case_insensitive_linK-manual.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> diff --git a/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_copy-manual.html b/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_copy-manual.html new file mode 100644 index 000000000..dcc7c97ac --- /dev/null +++ b/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_copy-manual.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> diff --git a/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_foo-manual.html b/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_foo-manual.html new file mode 100644 index 000000000..f9606f1b9 --- /dev/null +++ b/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_foo-manual.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> diff --git a/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_link-manual.html b/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_link-manual.html new file mode 100644 index 000000000..a4ba81965 --- /dev/null +++ b/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_link-manual.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> diff --git a/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_move-manual.html b/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_move-manual.html new file mode 100644 index 000000000..dfad88ba6 --- /dev/null +++ b/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_move-manual.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> diff --git a/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_multiple_values_foo_bar_move-manual.html b/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_multiple_values_foo_bar_move-manual.html new file mode 100644 index 000000000..3243774c9 --- /dev/null +++ b/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_multiple_values_foo_bar_move-manual.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> diff --git a/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_multiple_values_foo_link-manual.html b/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_multiple_values_foo_link-manual.html new file mode 100644 index 000000000..fd9e23d03 --- /dev/null +++ b/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_multiple_values_foo_link-manual.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> diff --git a/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_multiple_values_move_copy-manual.html b/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_multiple_values_move_copy-manual.html new file mode 100644 index 000000000..50ea9369f --- /dev/null +++ b/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_multiple_values_move_copy-manual.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> diff --git a/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_not_specified-manual.html b/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_not_specified-manual.html new file mode 100644 index 000000000..152c30022 --- /dev/null +++ b/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_not_specified-manual.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> diff --git a/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_unordered_unique_space_separated-manual.html b/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_unordered_unique_space_separated-manual.html new file mode 100644 index 000000000..24c5b032a --- /dev/null +++ b/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_unordered_unique_space_separated-manual.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> |