Bug 791597 - followup, fix tests being picky, rs=me,bustage
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Wed, 14 Dec 2016 16:53:20 +0000
changeset 449690 b52932a0811b2fc49decad407729cb61c8431272
parent 449689 e6be7f76066e7891b7c1d816d8717544491511f0
child 449691 824c4af81844a48cfdcf1a21d870002cfc6454af
child 449758 b1ab720c6d3e412ede797b08dfe63dca170f6ee0
push id38624
push usermozilla@kaply.com
push dateWed, 14 Dec 2016 19:19:00 +0000
reviewersme, bustage
bugs791597
milestone53.0a1
Bug 791597 - followup, fix tests being picky, rs=me,bustage MozReview-Commit-ID: IiqeMXNB6nH
browser/base/content/test/urlbar/browser_dragdropURL.js
--- a/browser/base/content/test/urlbar/browser_dragdropURL.js
+++ b/browser/base/content/test/urlbar/browser_dragdropURL.js
@@ -1,12 +1,15 @@
 "use strict";
 
 const TEST_URL = "data:text/html,a test page";
 const DRAG_URL = "http://www.example.com/";
 
 add_task(function* checkURLBarUpdateForDrag() {
   yield BrowserTestUtils.withNewTab(TEST_URL, function* (browser) {
-    EventUtils.synthesizeDrop(browser, gURLBar, [[{type: "text/uri-list", data: DRAG_URL}]], "copy", window);
+    // Have to use something other than the URL bar as a source, so picking the
+    // downloads button somewhat arbitrarily:
+    EventUtils.synthesizeDrop(document.getElementById("downloads-button"), gURLBar,
+                              [[{type: "text/plain", data: DRAG_URL}]], "copy", window);
     is(gURLBar.value, TEST_URL, "URL bar value should not have changed");
     is(gBrowser.selectedBrowser.userTypedValue, null, "Stored URL bar value should not have changed");
   });
 });