bug 772299 - <browser> widget's addProgressListener method should pass through aNotifyMask argument; r=gavin

--HG--
extra : rebase_source : 10c623c2adcb771312bb85896dbe7d4d9fc4d83c
This commit is contained in:
Myk Melez 2012-08-07 13:55:38 -07:00
parent e33e2203e3
commit 5c8c887f8c
3 changed files with 9 additions and 5 deletions

View File

@ -447,9 +447,13 @@
<method name="addProgressListener"> <method name="addProgressListener">
<parameter name="aListener"/> <parameter name="aListener"/>
<parameter name="aNotifyMask"/>
<body> <body>
<![CDATA[ <![CDATA[
this.webProgress.addProgressListener(aListener, Components.interfaces.nsIWebProgress.NOTIFY_ALL); if (!aNotifyMask) {
aNotifyMask = Components.interfaces.nsIWebProgress.NOTIFY_ALL;
}
this.webProgress.addProgressListener(aListener, aNotifyMask);
]]> ]]>
</body> </body>
</method> </method>

View File

@ -61,8 +61,8 @@ function onLoad() {
// available beforehand. // available beforehand.
Services.obs.addObserver(function observeOnce(subj, topic, data) { Services.obs.addObserver(function observeOnce(subj, topic, data) {
Services.obs.removeObserver(observeOnce, "webapprt-test-did-install"); Services.obs.removeObserver(observeOnce, "webapprt-test-did-install");
gAppBrowser.webProgress. gAppBrowser.addProgressListener(progressListener,
addProgressListener(progressListener,Ci.nsIWebProgress.NOTIFY_LOCATION); Ci.nsIWebProgress.NOTIFY_LOCATION);
}, "webapprt-test-did-install", false); }, "webapprt-test-did-install", false);
// This observer is present for the lifetime of the runtime. // This observer is present for the lifetime of the runtime.

View File

@ -36,8 +36,8 @@ function test() {
} }
}; };
appBrowser.webProgress. appBrowser.addProgressListener(progressListener,
addProgressListener(progressListener, Ci.nsIWebProgress.NOTIFY_LOCATION); Ci.nsIWebProgress.NOTIFY_LOCATION);
function testNext() { function testNext() {
if (!tests.length) { if (!tests.length) {