mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1212610 - Fix sorting permissions by site due a legacy property name being referenced. r=jaws
A reference to `rawHost` wasn't updated to `origin`.
This commit is contained in:
parent
7619f28e02
commit
0c6d296682
@ -173,6 +173,47 @@ var testRunner = {
|
||||
},
|
||||
observances: [{ type: "cookie", origin: "http://localhost:12345", data: "deleted" }],
|
||||
},
|
||||
{
|
||||
expectPermObservancesDuringTestFunction: true,
|
||||
test(params) {
|
||||
for (let URL of ["http://a", "http://z", "http://b"]) {
|
||||
let URI = params.ioService.newURI(URL, null, null);
|
||||
params.pm.add(URI, "cookie", Ci.nsIPermissionManager.ALLOW_ACTION);
|
||||
}
|
||||
|
||||
is(params.tree.view.rowCount, 3, "Three permissions should be present");
|
||||
is(params.tree.view.getCellText(0, params.nameCol), "http://a",
|
||||
"site should be sorted. 'a' should be first");
|
||||
is(params.tree.view.getCellText(1, params.nameCol), "http://b",
|
||||
"site should be sorted. 'b' should be second");
|
||||
is(params.tree.view.getCellText(2, params.nameCol), "http://z",
|
||||
"site should be sorted. 'z' should be third");
|
||||
|
||||
// Sort descending then check results in cleanup since sorting isn't synchronous.
|
||||
EventUtils.synthesizeMouseAtCenter(params.doc.getElementById("siteCol"), {},
|
||||
params.doc.defaultView);
|
||||
params.btnApplyChanges.doCommand();
|
||||
},
|
||||
observances: [{ type: "cookie", origin: "http://a", data: "added",
|
||||
capability: Ci.nsIPermissionManager.ALLOW_ACTION },
|
||||
{ type: "cookie", origin: "http://z", data: "added",
|
||||
capability: Ci.nsIPermissionManager.ALLOW_ACTION },
|
||||
{ type: "cookie", origin: "http://b", data: "added",
|
||||
capability: Ci.nsIPermissionManager.ALLOW_ACTION }],
|
||||
cleanUp(params) {
|
||||
is(params.tree.view.getCellText(0, params.nameCol), "http://z",
|
||||
"site should be sorted. 'z' should be first");
|
||||
is(params.tree.view.getCellText(1, params.nameCol), "http://b",
|
||||
"site should be sorted. 'b' should be second");
|
||||
is(params.tree.view.getCellText(2, params.nameCol), "http://a",
|
||||
"site should be sorted. 'a' should be third");
|
||||
|
||||
for (let URL of ["http://a", "http://z", "http://b"]) {
|
||||
let uri = params.ioService.newURI(URL, null, null);
|
||||
params.pm.remove(uri, "cookie");
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
_currentTest: -1,
|
||||
|
@ -53,7 +53,7 @@
|
||||
onselect="gPermissionManager.onPermissionSelected();">
|
||||
<treecols>
|
||||
<treecol id="siteCol" label="&treehead.sitename.label;" flex="3"
|
||||
data-field-name="rawHost" persist="width"/>
|
||||
data-field-name="origin" persist="width"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="statusCol" label="&treehead.status.label;" flex="1"
|
||||
data-field-name="capability" persist="width"/>
|
||||
|
Loading…
Reference in New Issue
Block a user