/* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; /** * Tests that by setting a Picture-in-Picture toggle position policy * in the sharedData structure, that the toggle position can be * change for a particular URI. */ add_task(async () => { let positionPolicies = [ TOGGLE_POLICIES.TOP, TOGGLE_POLICIES.ONE_QUARTER, TOGGLE_POLICIES.MIDDLE, TOGGLE_POLICIES.THREE_QUARTERS, TOGGLE_POLICIES.BOTTOM, ]; for (let policy of positionPolicies) { Services.ppmm.sharedData.set(SHARED_DATA_KEY, { "*://example.com/*": { policy }, }); Services.ppmm.sharedData.flush(); let expectations = { "with-controls": { canToggle: true, policy }, "no-controls": { canToggle: true, policy }, }; // For