зеркало из https://github.com/mozilla/gecko-dev.git
Sanitize browser_drag.js
This commit is contained in:
Родитель
ac3befa341
Коммит
ac6a36ad19
|
@ -28,20 +28,14 @@ function test()
|
||||||
EventUtils.synthesizeKey("VK_ESCAPE", {}, window);
|
EventUtils.synthesizeKey("VK_ESCAPE", {}, window);
|
||||||
|
|
||||||
// now test dragging onto a tab
|
// now test dragging onto a tab
|
||||||
var tab1 = gBrowser.addTab();
|
var tab = gBrowser.addTab();
|
||||||
var browser1 = gBrowser.getBrowserForTab(tab1);
|
var browser = gBrowser.getBrowserForTab(tab);
|
||||||
|
|
||||||
var tab2 = gBrowser.addTab();
|
browser.addEventListener("load", function () {
|
||||||
var browser2 = gBrowser.getBrowserForTab(tab2);
|
is(browser.contentWindow.location, "http://mochi.test:8888/", "drop on tab");
|
||||||
|
gBrowser.removeTab(tab);
|
||||||
gBrowser.selectedTab = tab1;
|
|
||||||
|
|
||||||
browser2.addEventListener("load", function () {
|
|
||||||
is(browser2.contentWindow.location, "http://mochi.test:8888/", "drop on tab");
|
|
||||||
gBrowser.removeCurrentTab();
|
|
||||||
gBrowser.removeCurrentTab();
|
|
||||||
finish();
|
finish();
|
||||||
}, true);
|
}, true);
|
||||||
|
|
||||||
EventUtils.synthesizeDrop(tab2, [[{type: "text/uri-list", data: "http://mochi.test:8888/"}]], "copy", window);
|
EventUtils.synthesizeDrop(tab, [[{type: "text/uri-list", data: "http://mochi.test:8888/"}]], "copy", window);
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче