mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-14 11:17:31 +09:00
import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo
This commit is contained in:
commit
dcd9973243
150858 changed files with 23884658 additions and 0 deletions
17
js/ductwork/debugger/tests/head_dbg.js
Normal file
17
js/ductwork/debugger/tests/head_dbg.js
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
"use strict";
|
||||
const Cc = Components.classes;
|
||||
const Ci = Components.interfaces;
|
||||
const Cu = Components.utils;
|
||||
const Cr = Components.results;
|
||||
|
||||
function testGlobal(aName) {
|
||||
let systemPrincipal = Cc["@mozilla.org/systemprincipal;1"]
|
||||
.createInstance(Ci.nsIPrincipal);
|
||||
|
||||
let sandbox = Cu.Sandbox(systemPrincipal);
|
||||
Cu.evalInSandbox("this.__name = '" + aName + "'", sandbox);
|
||||
return sandbox;
|
||||
}
|
||||
30
js/ductwork/debugger/tests/test_nativewrappers.js
Normal file
30
js/ductwork/debugger/tests/test_nativewrappers.js
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
function run_test()
|
||||
{
|
||||
Components.utils.import("resource://gre/modules/jsdebugger.jsm");
|
||||
addDebuggerToGlobal(this);
|
||||
var g = testGlobal("test1");
|
||||
|
||||
var dbg = new Debugger();
|
||||
dbg.addDebuggee(g);
|
||||
dbg.onDebuggerStatement = function(aFrame) {
|
||||
let args = aFrame["arguments"];
|
||||
try {
|
||||
args[0];
|
||||
do_check_true(true);
|
||||
} catch(ex) {
|
||||
do_check_true(false);
|
||||
}
|
||||
};
|
||||
|
||||
g.eval("function stopMe(arg) {debugger;}");
|
||||
|
||||
g2 = testGlobal("test2");
|
||||
g2.g = g;
|
||||
g2.eval("(" + function createBadEvent() {
|
||||
let parser = Components.classes["@mozilla.org/xmlextras/domparser;1"].createInstance(Components.interfaces.nsIDOMParser);
|
||||
let doc = parser.parseFromString("<foo></foo>", "text/xml");
|
||||
g.stopMe(doc.createEvent("MouseEvent"));
|
||||
} + ")()");
|
||||
|
||||
dbg.enabled = false;
|
||||
}
|
||||
8
js/ductwork/debugger/tests/xpcshell.ini
Normal file
8
js/ductwork/debugger/tests/xpcshell.ini
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
[DEFAULT]
|
||||
head = head_dbg.js
|
||||
tail =
|
||||
skip-if = toolkit == 'android'
|
||||
|
||||
[test_nativewrappers.js]
|
||||
# Bug 685068
|
||||
fail-if = os == "android"
|
||||
Loading…
Add table
Add a link
Reference in a new issue