37 var appDir = Components.classes[
"@mozilla.org/file/directory_service;1"]
38 .getService(Components.interfaces.nsIProperties)
39 .get(
"resource:app", Components.interfaces.nsIFile);
43 var topsrcdir = appDir.parent.parent;
46 topsrcdir = topsrcdir.parent.parent.parent;
49 var
file = topsrcdir.clone();
50 for each (var part
in [
"components",
"property",
"src",
"sbStandardProperties.h"] )
53 var
istream = Components.classes[
"@mozilla.org/network/file-input-stream;1"]
54 .createInstance(Components.interfaces.nsIFileInputStream);
55 istream.init(
file, 0x01 , 0400, 0);
56 istream.QueryInterface(Components.interfaces.nsILineInputStream);
61 var
hasMore = istream.readLine(line);
62 var result = line.value.match(/
"http:\/\/songbirdnest.com\/data\/1.0#([^"]+)
"/);
64 gProps[result[1]] = true;
72 function checkJSMProps() {
73 Components.utils.import("resource:
75 for (var
i in SBProperties) {
76 if (typeof SBProperties[
i] !=
"string")
continue;
77 if (SBProperties[
i].length <= SBProperties.base.length) {
80 var prop = SBProperties[
i].match(/http:\/\/songbirdnest.com\/
data\/1.0#(\w+)/)[1];
81 assertTrue(prop in
gProps,
"property " + prop +
" is only in sbProperties.jsm");
85 assertTrue(prop in props,
"property " + prop +
" is not in sbProperties.jsm");
var gProps
Tests to make sure the JS and the C++ properties match.
function assertTrue(aTest, aMessage)
StringArrayEnumerator prototype hasMore
_getSelectedPageStyle s i