summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_multiple_values_foo_link-manual.html
blob: fd9e23d03a92faf6d3fd7932ce4cef2cdac9056f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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>