mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 962212 (followup) - Fix a typo in metro Tab constructor that broke inheritance of private flag [r=azasypkin]
This commit is contained in:
parent
aff318a34b
commit
518c28a2ae
@ -1260,7 +1260,7 @@ function Tab(aURI, aParams, aOwner) {
|
||||
if ("private" in aParams) {
|
||||
this._private = aParams.private;
|
||||
} else if (aOwner) {
|
||||
this._private = aOwner.private;
|
||||
this._private = aOwner._private;
|
||||
}
|
||||
|
||||
this.owner = aOwner || null;
|
||||
|
@ -16,12 +16,22 @@ gTests.push({
|
||||
is(tab.isPrivate, false, "Tabs are not private by default");
|
||||
is(tab.chromeTab.hasAttribute("private"), false,
|
||||
"non-private tab has no private attribute");
|
||||
|
||||
let child = Browser.addTab("about:mozilla", false, tab);
|
||||
is(child.isPrivate, false, "Child of a non-private tab is not private");
|
||||
|
||||
Browser.closeTab(child, { forceClose: true });
|
||||
Browser.closeTab(tab, { forceClose: true });
|
||||
|
||||
tab = Browser.addTab("about:mozilla", false, null, { private: true });
|
||||
is(tab.isPrivate, true, "Create a private tab");
|
||||
is(tab.chromeTab.getAttribute("private"), "true",
|
||||
"private tab has private attribute");
|
||||
|
||||
child = Browser.addTab("about:mozilla", false, tab);
|
||||
is(child.isPrivate, true, "Child of a private tab is private");
|
||||
|
||||
Browser.closeTab(child, { forceClose: true });
|
||||
Browser.closeTab(tab, { forceClose: true });
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user