Remove the special cases for the old Browser package
A browser request now needs the session token of its window. Disabling an old runestone.browser package no longer stops the engine. One list of built-in modules starts the browser and the theme editor, and the plugin menus skip their tools. The access rules no longer treat the browser ID in a special way.
This commit is contained in:
@@ -15,10 +15,14 @@ test("plugin access separates settings, launchers, and commands without reading
|
||||
|
||||
test("installed RuneStone packages retain access before their next package update", () => {
|
||||
assert.equal(pluginAccess("runestone.local-autocomplete", [], [view("settings")])[0].surface, "settings");
|
||||
assert.deepEqual(pluginAccess("runestone.browser", [command("new-tab")], [view("tab-123")]).map(({ id, surface }) => [id, surface]), [["new-tab", "open"]]);
|
||||
assert.equal(pluginAccess("org.example.test", [], [view("settings")])[0].surface, "open");
|
||||
assert.equal(pluginAccess("runestone.local-autocomplete", [], [view("settings", { settings: false })])[0].surface, "open");
|
||||
assert.equal(pluginAccess("runestone.browser", [command("new-tab", { category: "action" })], [])[0].surface, "commands");
|
||||
});
|
||||
|
||||
test("the browser ID gets the same access rules as any other owner", () => {
|
||||
// The built-in browser sets `category` and `launcher` itself. The old Browser package had no special rules left.
|
||||
assert.deepEqual(pluginAccess("runestone.browser", [command("new-tab")], [view("tab-123")]).map(({ id, surface }) => [id, surface]), [["new-tab", "commands"], ["tab-123", "open"]]);
|
||||
assert.deepEqual(pluginAccess("runestone.browser", [command("new-tab", { category: "open", icon: "globe" })], [view("tab-123", { launcher: false })]).map(({ id, surface, icon }) => [id, surface, icon]), [["new-tab", "open", "globe"]]);
|
||||
});
|
||||
|
||||
test("command launchers retain the plugin action icon", () => {
|
||||
|
||||
Reference in New Issue
Block a user