зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1090929 - Enable the break-on-dom-tests;r=mratcliffe
This commit is contained in:
Родитель
193b552c7e
Коммит
375a1cb9d4
|
@ -134,19 +134,19 @@ skip-if = e10s
|
|||
[browser_dbg_break-on-dom-01.js]
|
||||
skip-if = e10s
|
||||
[browser_dbg_break-on-dom-02.js]
|
||||
skip-if = e10s
|
||||
skip-if = e10s && debug
|
||||
[browser_dbg_break-on-dom-03.js]
|
||||
skip-if = e10s
|
||||
skip-if = e10s && debug
|
||||
[browser_dbg_break-on-dom-04.js]
|
||||
skip-if = e10s
|
||||
skip-if = e10s && debug
|
||||
[browser_dbg_break-on-dom-05.js]
|
||||
skip-if = e10s
|
||||
skip-if = e10s && debug
|
||||
[browser_dbg_break-on-dom-06.js]
|
||||
skip-if = e10s
|
||||
skip-if = e10s && debug
|
||||
[browser_dbg_break-on-dom-07.js]
|
||||
skip-if = e10s
|
||||
skip-if = e10s && debug
|
||||
[browser_dbg_break-on-dom-08.js]
|
||||
skip-if = e10s
|
||||
skip-if = e10s && debug
|
||||
[browser_dbg_break-on-dom-event-01.js]
|
||||
skip-if = e10s || os == "mac" || e10s # Bug 895426
|
||||
[browser_dbg_break-on-dom-event-02.js]
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
const TAB_URL = EXAMPLE_URL + "doc_event-listeners-02.html";
|
||||
|
||||
function test() {
|
||||
initDebugger(TAB_URL).then(([aTab, aDebuggee, aPanel]) => {
|
||||
initDebugger(TAB_URL).then(([aTab,, aPanel]) => {
|
||||
let gDebugger = aPanel.panelWin;
|
||||
let gView = gDebugger.DebuggerView;
|
||||
let gEvents = gView.EventListeners;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
const TAB_URL = EXAMPLE_URL + "doc_event-listeners-02.html";
|
||||
|
||||
function test() {
|
||||
initDebugger(TAB_URL).then(([aTab, aDebuggee, aPanel]) => {
|
||||
initDebugger(TAB_URL).then(([aTab,, aPanel]) => {
|
||||
let gDebugger = aPanel.panelWin;
|
||||
let gView = gDebugger.DebuggerView;
|
||||
let gEvents = gView.EventListeners;
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
const TAB_URL = EXAMPLE_URL + "doc_event-listeners-02.html";
|
||||
|
||||
function test() {
|
||||
initDebugger(TAB_URL).then(([aTab, aDebuggee, aPanel]) => {
|
||||
initDebugger(TAB_URL).then(([aTab,, aPanel]) => {
|
||||
let gDebugger = aPanel.panelWin;
|
||||
let gView = gDebugger.DebuggerView;
|
||||
let gController = gDebugger.DebuggerController
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
const TAB_URL = EXAMPLE_URL + "doc_event-listeners-02.html";
|
||||
|
||||
function test() {
|
||||
initDebugger(TAB_URL).then(([aTab, aDebuggee, aPanel]) => {
|
||||
initDebugger(TAB_URL).then(([aTab,, aPanel]) => {
|
||||
let gDebugger = aPanel.panelWin;
|
||||
let gView = gDebugger.DebuggerView;
|
||||
let gController = gDebugger.DebuggerController
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
const TAB_URL = EXAMPLE_URL + "doc_event-listeners-02.html";
|
||||
|
||||
function test() {
|
||||
initDebugger(TAB_URL).then(([aTab, aDebuggee, aPanel]) => {
|
||||
initDebugger(TAB_URL).then(([aTab,, aPanel]) => {
|
||||
let gDebugger = aPanel.panelWin;
|
||||
let gView = gDebugger.DebuggerView;
|
||||
let gController = gDebugger.DebuggerController
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
function test() {
|
||||
initDebugger("about:blank").then(([aTab, aDebuggee, aPanel]) => {
|
||||
initDebugger("about:blank").then(([aTab,, aPanel]) => {
|
||||
let gDebugger = aPanel.panelWin;
|
||||
let gView = gDebugger.DebuggerView;
|
||||
let gEvents = gView.EventListeners;
|
||||
|
|
|
@ -8,14 +8,15 @@
|
|||
const TAB_URL = EXAMPLE_URL + "doc_event-listeners-02.html";
|
||||
|
||||
function test() {
|
||||
initDebugger(TAB_URL).then(([aTab, aDebuggee, aPanel]) => {
|
||||
initDebugger(TAB_URL).then(([aTab,, aPanel]) => {
|
||||
let gTab = aTab;
|
||||
let gDebugger = aPanel.panelWin;
|
||||
let gView = gDebugger.DebuggerView;
|
||||
let gEvents = gView.EventListeners;
|
||||
|
||||
Task.spawn(function() {
|
||||
yield waitForSourceShown(aPanel, ".html");
|
||||
aDebuggee.addBodyClickEventListener();
|
||||
yield callInTab(gTab, "addBodyClickEventListener");
|
||||
|
||||
let fetched = waitForDebuggerEvents(aPanel, gDebugger.EVENTS.EVENT_LISTENERS_FETCHED);
|
||||
gView.toggleInstrumentsPane({ visible: true, animated: false }, 1);
|
||||
|
@ -33,11 +34,7 @@ function test() {
|
|||
yield ensureThreadClientState(aPanel, "resumed");
|
||||
|
||||
let paused = waitForCaretAndScopes(aPanel, 48);
|
||||
// Spin the event loop before causing the debuggee to pause, to allow
|
||||
// this function to yield first.
|
||||
executeSoon(() => {
|
||||
EventUtils.sendMouseEvent({ type: "click" }, aDebuggee.document.body, aDebuggee);
|
||||
});
|
||||
sendMouseClickToTab(gTab, content.document.body);
|
||||
yield paused;
|
||||
yield ensureThreadClientState(aPanel, "paused");
|
||||
|
||||
|
|
|
@ -1,9 +1,25 @@
|
|||
"use strict";
|
||||
|
||||
const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
|
||||
const { loadSubScript } = Cc['@mozilla.org/moz/jssubscript-loader;1'].
|
||||
getService(Ci.mozIJSSubScriptLoader);
|
||||
|
||||
const EventUtils = {};
|
||||
loadSubScript("chrome://marionette/content/EventUtils.js", EventUtils);
|
||||
|
||||
dump("Frame script loaded.\n");
|
||||
|
||||
addMessageListener("test:call", function (message) {
|
||||
dump("Calling function with name " + message.data + ".\n");
|
||||
|
||||
XPCNativeWrapper.unwrap(content)[message.data]();
|
||||
sendAsyncMessage("test:call");
|
||||
});
|
||||
|
||||
addMessageListener("test:click", function (message) {
|
||||
dump("Sending mouse click.\n");
|
||||
|
||||
let target = message.objects.target;
|
||||
EventUtils.synthesizeMouseAtCenter(target, {},
|
||||
target.ownerDocument.defaultView);
|
||||
});
|
||||
|
|
|
@ -964,4 +964,13 @@ function callInTab(tab, name) {
|
|||
info("Calling function with name " + name + " in tab.");
|
||||
|
||||
sendMessageToTab(tab, "test:call", name);
|
||||
waitForMessageFromTab(tab, "test:call");
|
||||
}
|
||||
|
||||
function sendMouseClickToTab(tab, target) {
|
||||
info("Sending mouse click to tab.");
|
||||
|
||||
sendMessageToTab(tab, "test:click", undefined, {
|
||||
target: target
|
||||
});
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче