tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

browser_dragdrop_unprotected_diff_origin.js (1243B)


      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, where the window tabs are of different
      7 // origin, containing same-origin (as the outer frame) iframes.
      8 // dom.events.dataTransfer.protected.enabled = false
      9 
     10 "use strict";
     11 
     12 const kBaseUrl1 = "https://example.org/browser/dom/events/test/";
     13 const kBaseUrl2 = "https://example.com/browser/dom/events/test/";
     14 
     15 add_setup(async function () {
     16  await SpecialPowers.pushPrefEnv({
     17    set: [["dom.events.dataTransfer.protected.enabled", false]],
     18  });
     19  registerCleanupFunction(async function () {
     20    SpecialPowers.popPrefEnv();
     21  });
     22 
     23  await setup({
     24    outerURL1: kBaseUrl1 + "browser_dragdrop_outer.html",
     25    outerURL2: kBaseUrl2 + "browser_dragdrop_outer.html",
     26    innerURL1: kBaseUrl1 + "browser_dragdrop_inner.html",
     27    innerURL2: kBaseUrl2 + "browser_dragdrop_inner.html",
     28  });
     29 });
     30 
     31 Services.scriptloader.loadSubScript(
     32  "chrome://mochitests/content/browser/dom/events/test/browser_dragdrop_impl.js",
     33  this
     34 );