mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 07:48:38 +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
|
|
@ -0,0 +1,45 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* Tests whether the profiler responds to "getSharedLibraryInformation" adequately.
|
||||
*/
|
||||
|
||||
const Profiler = Cc["@mozilla.org/tools/profiler;1"].getService(Ci.nsIProfiler);
|
||||
|
||||
function run_test()
|
||||
{
|
||||
get_chrome_actors((client, form) => {
|
||||
let actor = form.profilerActor;
|
||||
test_getsharedlibraryinformation(client, actor, () => {
|
||||
client.close().then(() => {
|
||||
do_test_finished();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
do_test_pending();
|
||||
}
|
||||
|
||||
function test_getsharedlibraryinformation(client, actor, callback)
|
||||
{
|
||||
client.request({ to: actor, type: "getSharedLibraryInformation" }, response => {
|
||||
do_check_eq(typeof response.sharedLibraryInformation, "string");
|
||||
let libs = [];
|
||||
try {
|
||||
libs = JSON.parse(response.sharedLibraryInformation);
|
||||
} catch (e) {
|
||||
do_check_true(false);
|
||||
}
|
||||
do_check_eq(typeof libs, "object");
|
||||
do_check_true(libs.length >= 1);
|
||||
do_check_eq(typeof libs[0], "object");
|
||||
do_check_eq(typeof libs[0].name, "string");
|
||||
do_check_eq(typeof libs[0].start, "number");
|
||||
do_check_eq(typeof libs[0].end, "number");
|
||||
do_check_true(libs[0].start <= libs[0].end);
|
||||
callback();
|
||||
});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue