summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute.html')
-rw-r--r--testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute.html45
1 files changed, 45 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 0000000000..feb73eccfe
--- /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>