зеркало из 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);
|
||||
|
||||
// now test dragging onto a tab
|
||||
var tab1 = gBrowser.addTab();
|
||||
var browser1 = gBrowser.getBrowserForTab(tab1);
|
||||
var tab = gBrowser.addTab();
|
||||
var browser = gBrowser.getBrowserForTab(tab);
|
||||
|
||||
var tab2 = gBrowser.addTab();
|
||||
var browser2 = gBrowser.getBrowserForTab(tab2);
|
||||
|
||||
gBrowser.selectedTab = tab1;
|
||||
|
||||
browser2.addEventListener("load", function () {
|
||||
is(browser2.contentWindow.location, "http://mochi.test:8888/", "drop on tab");
|
||||
gBrowser.removeCurrentTab();
|
||||
gBrowser.removeCurrentTab();
|
||||
browser.addEventListener("load", function () {
|
||||
is(browser.contentWindow.location, "http://mochi.test:8888/", "drop on tab");
|
||||
gBrowser.removeTab(tab);
|
||||
finish();
|
||||
}, 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);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче