summaryrefslogtreecommitdiffstats
path: root/devtools/client/inspector/markup/test/browser_markup_dragdrop_dragRootNode.js
blob: 4528bf1fa7f9a05802f7723e84ad092bb452903b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* Any copyright is dedicated to the Public Domain.
 http://creativecommons.org/publicdomain/zero/1.0/ */

"use strict";

// Test that the root node isn't draggable (as well as head and body).

const TEST_URL = URL_ROOT + "doc_markup_dragdrop.html";
const TEST_DATA = ["html", "head", "body"];

add_task(function* () {
  let {inspector} = yield openInspectorForURL(TEST_URL);

  for (let selector of TEST_DATA) {
    info("Try to drag/drop node " + selector);
    yield simulateNodeDrag(inspector, selector);

    let container = yield getContainerForSelector(selector, inspector);
    ok(!container.isDragging, "The container hasn't been marked as dragging");
  }
});