mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 01:05:45 +00:00
Bug 1564221 - Remove QueryInterface parameter from MockSecurityInfo in devtools tests r=ochameau
The `MockSecurityInfo` instances in the patched devtools tests are not actually being used as `nsITransportSecurityInfo` instances; while `QueryInterface` methods were generated for the them, these were never called. Additionally, the methods they are being passed to are not XPCOM-defined and therefore do not strictly require `nsITransportSecurityInfo`. Differential Revision: https://phabricator.services.mozilla.com/D40521 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
3df3c840f0
commit
bdc312d909
@ -32,8 +32,10 @@ const MockCertificate = {
|
||||
},
|
||||
};
|
||||
|
||||
// This *cannot* be used as an nsITransportSecurityInfo (since that interface is
|
||||
// builtinclass) but the methods being tested aren't defined by XPCOM and aren't
|
||||
// calling QueryInterface, so this usage is fine.
|
||||
const MockSecurityInfo = {
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsITransportSecurityInfo]),
|
||||
securityState: wpl.STATE_IS_SECURE,
|
||||
errorCode: 0,
|
||||
cipherName: "TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256",
|
||||
|
@ -18,8 +18,11 @@ Object.defineProperty(this, "NetworkHelper", {
|
||||
});
|
||||
|
||||
const wpl = Ci.nsIWebProgressListener;
|
||||
|
||||
// This *cannot* be used as an nsITransportSecurityInfo (since that interface is
|
||||
// builtinclass) but the methods being tested aren't defined by XPCOM and aren't
|
||||
// calling QueryInterface, so this usage is fine.
|
||||
const MockSecurityInfo = {
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsITransportSecurityInfo]),
|
||||
securityState: wpl.STATE_IS_BROKEN,
|
||||
errorCode: 0,
|
||||
// nsISSLStatus.TLS_VERSION_1_2
|
||||
|
@ -19,8 +19,10 @@ Object.defineProperty(this, "NetworkHelper", {
|
||||
|
||||
const wpl = Ci.nsIWebProgressListener;
|
||||
|
||||
// This *cannot* be used as an nsITransportSecurityInfo (since that interface is
|
||||
// builtinclass) but the methods being tested aren't defined by XPCOM and aren't
|
||||
// calling QueryInterface, so this usage is fine.
|
||||
const MockSecurityInfo = {
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsITransportSecurityInfo]),
|
||||
securityState: wpl.STATE_IS_SECURE,
|
||||
errorCode: 0,
|
||||
cipherName: "TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256",
|
||||
|
Loading…
Reference in New Issue
Block a user