mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-02 07:05:24 +00:00
b6fe076c28
--HG-- rename : browser/devtools/commandline/GcliCookieCommands.jsm => browser/devtools/commandline/CmdCookie.jsm rename : browser/devtools/commandline/GcliCommands.jsm => browser/devtools/commandline/Commands.jsm rename : browser/devtools/commandline/gcli.css => browser/devtools/commandline/commandline.css rename : browser/devtools/commandline/gclioutput.xhtml => browser/devtools/commandline/commandlineoutput.xhtml rename : browser/devtools/commandline/gclitooltip.xhtml => browser/devtools/commandline/commandlinetooltip.xhtml rename : browser/devtools/commandline/test/browser_gcli_addon.js => browser/devtools/commandline/test/browser_cmd_addon.js rename : browser/devtools/commandline/test/browser_gcli_calllog.js => browser/devtools/commandline/test/browser_cmd_calllog.js rename : browser/devtools/commandline/test/browser_gcli_commands.js => browser/devtools/commandline/test/browser_cmd_commands.js rename : browser/devtools/commandline/test/browser_gcli_cookie.js => browser/devtools/commandline/test/browser_cmd_cookie.js rename : browser/devtools/commandline/test/browser_gcli_integrate.js => browser/devtools/commandline/test/browser_cmd_integrate.js rename : browser/devtools/commandline/test/browser_gcli_jsb.js => browser/devtools/commandline/test/browser_cmd_jsb.js rename : browser/devtools/commandline/test/resources_jsb_script.js => browser/devtools/commandline/test/browser_cmd_jsb_script.jsi rename : browser/devtools/commandline/test/browser_gcli_inspect.html => browser/devtools/commandline/test/browser_cmd_pagemod_export.html rename : browser/devtools/commandline/test/browser_gcli_pagemod_export.js => browser/devtools/commandline/test/browser_cmd_pagemod_export.js rename : browser/devtools/commandline/test/browser_gcli_pref.js => browser/devtools/commandline/test/browser_cmd_pref.js rename : browser/devtools/commandline/test/browser_gcli_restart.js => browser/devtools/commandline/test/browser_cmd_restart.js rename : browser/devtools/commandline/test/browser_gcli_settings.js => browser/devtools/commandline/test/browser_cmd_settings.js rename : browser/devtools/commandline/test/resources_dbg.html => browser/devtools/commandline/test/browser_dbg_cmd.html rename : browser/devtools/commandline/test/browser_gcli_dbg.js => browser/devtools/commandline/test/browser_dbg_cmd.js rename : browser/devtools/commandline/test/browser_gcli_break.html => browser/devtools/commandline/test/browser_dbg_cmd_break.html rename : browser/devtools/commandline/test/browser_gcli_break.js => browser/devtools/commandline/test/browser_dbg_cmd_break.js rename : browser/devtools/commandline/test/browser_gcli_inspect.html => browser/devtools/highlighter/test/browser_inspector_cmd_inspect.html rename : browser/devtools/commandline/test/browser_gcli_inspect.js => browser/devtools/highlighter/test/browser_inspector_cmd_inspect.js rename : browser/devtools/commandline/test/browser_gcli_responsivemode.js => browser/devtools/responsivedesign/test/browser_responsive_cmd.js rename : browser/devtools/commandline/test/resources.html => browser/devtools/styleeditor/test/browser_styleeditor_cmd_edit.html rename : browser/devtools/commandline/test/browser_gcli_edit.js => browser/devtools/styleeditor/test/browser_styleeditor_cmd_edit.js rename : browser/devtools/commandline/test/resources_inpage.js => browser/devtools/styleeditor/test/resources_inpage.jsi rename : browser/devtools/commandline/test/resources_inpage1.css => browser/devtools/styleeditor/test/resources_inpage1.css rename : browser/devtools/commandline/test/resources_inpage2.css => browser/devtools/styleeditor/test/resources_inpage2.css rename : browser/devtools/commandline/GcliTiltCommands.jsm => browser/devtools/tilt/CmdTilt.jsm rename : browser/themes/gnomestripe/devtools/gcli.css => browser/themes/gnomestripe/devtools/commandline.css rename : browser/themes/pinstripe/devtools/gcli.css => browser/themes/pinstripe/devtools/commandline.css rename : browser/themes/winstripe/devtools/gcli.css => browser/themes/winstripe/devtools/commandline.css
100 lines
2.9 KiB
JavaScript
100 lines
2.9 KiB
JavaScript
/* Any copyright is dedicated to the Public Domain.
|
|
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
|
|
|
// Tests that the break command works as it should
|
|
|
|
const TEST_URI = "http://example.com/browser/browser/devtools/commandline/" +
|
|
"test/browser_dbg_cmd_break.html";
|
|
|
|
function test() {
|
|
DeveloperToolbarTest.test(TEST_URI, [ testBreakCommands ]);
|
|
}
|
|
|
|
function testBreakCommands() {
|
|
|
|
info('###################################################');
|
|
info('###################################################');
|
|
info('###################################################');
|
|
info('###################################################');
|
|
info('###################################################');
|
|
info('###################################################');
|
|
info(content.document.documentElement.innerHTML + '\n');
|
|
|
|
DeveloperToolbarTest.checkInputStatus({
|
|
typed: "brea",
|
|
directTabText: "k",
|
|
status: "ERROR"
|
|
});
|
|
|
|
DeveloperToolbarTest.checkInputStatus({
|
|
typed: "break",
|
|
status: "ERROR"
|
|
});
|
|
|
|
DeveloperToolbarTest.checkInputStatus({
|
|
typed: "break add",
|
|
status: "ERROR"
|
|
});
|
|
|
|
DeveloperToolbarTest.checkInputStatus({
|
|
typed: "break add line",
|
|
emptyParameters: [ " <file>", " <line>" ],
|
|
status: "ERROR"
|
|
});
|
|
|
|
let pane = DebuggerUI.toggleDebugger();
|
|
|
|
var dbgConnected = DeveloperToolbarTest.checkCalled(function() {
|
|
pane._frame.removeEventListener("Debugger:Connecting", dbgConnected, true);
|
|
|
|
// Wait for the initial resume.
|
|
let client = pane.contentWindow.gClient;
|
|
|
|
var resumed = DeveloperToolbarTest.checkCalled(function() {
|
|
|
|
var framesAdded = DeveloperToolbarTest.checkCalled(function() {
|
|
DeveloperToolbarTest.checkInputStatus({
|
|
typed: "break add line " + TEST_URI + " " + content.wrappedJSObject.line0,
|
|
status: "VALID"
|
|
});
|
|
DeveloperToolbarTest.exec({
|
|
args: {
|
|
type: 'line',
|
|
file: TEST_URI,
|
|
line: content.wrappedJSObject.line0
|
|
},
|
|
completed: false
|
|
});
|
|
|
|
DeveloperToolbarTest.checkInputStatus({
|
|
typed: "break list",
|
|
status: "VALID"
|
|
});
|
|
DeveloperToolbarTest.exec();
|
|
|
|
var cleanup = DeveloperToolbarTest.checkCalled(function() {
|
|
DeveloperToolbarTest.checkInputStatus({
|
|
typed: "break del 0",
|
|
status: "VALID"
|
|
});
|
|
DeveloperToolbarTest.exec({
|
|
args: { breakid: 0 },
|
|
completed: false
|
|
});
|
|
});
|
|
|
|
client.activeThread.resume(cleanup);
|
|
});
|
|
|
|
client.activeThread.addOneTimeListener("framesadded", framesAdded);
|
|
|
|
// Trigger newScript notifications using eval.
|
|
content.wrappedJSObject.firstCall();
|
|
});
|
|
|
|
client.addOneTimeListener("resumed", resumed);
|
|
});
|
|
|
|
pane._frame.addEventListener("Debugger:Connecting", dbgConnected, true);
|
|
}
|