browser_dragdrop_unprotected_same_origin.js (1093B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 // Test that drag and drop events are sent at the right time. Includes tests for 6 // dragging between windows and iframes, all of the same origin. 7 // dom.events.dataTransfer.protected.enabled = false 8 9 "use strict"; 10 11 const kBaseUrl = "https://example.org/browser/dom/events/test/"; 12 13 add_setup(async function () { 14 await SpecialPowers.pushPrefEnv({ 15 set: [["dom.events.dataTransfer.protected.enabled", false]], 16 }); 17 registerCleanupFunction(async function () { 18 SpecialPowers.popPrefEnv(); 19 }); 20 21 await setup({ 22 outerURL1: kBaseUrl + "browser_dragdrop_outer.html", 23 outerURL2: kBaseUrl + "browser_dragdrop_outer.html", 24 innerURL1: kBaseUrl + "browser_dragdrop_inner.html", 25 innerURL2: kBaseUrl + "browser_dragdrop_inner.html", 26 }); 27 }); 28 29 Services.scriptloader.loadSubScript( 30 "chrome://mochitests/content/browser/dom/events/test/browser_dragdrop_impl.js", 31 this 32 );