Bug 1090929 - Enable the break-on-dom-tests;r=mratcliffe

This commit is contained in:
Eddy Bruël 2014-11-06 10:18:10 +01:00
Родитель 193b552c7e
Коммит 375a1cb9d4
10 изменённых файлов: 42 добавлений и 20 удалений

Просмотреть файл

@ -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
});
}