text
stringlengths
14
100k
source
stringclasses
1 value
repo
stringclasses
810 values
language
stringclasses
13 values
// This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. // Utility to register JSWindowActors import { ActorManagerParent } from "resource://gre/modules/ActorManagerParent.s...
fim
zen-browser/desktop
javascript
<|fim_prefix|>// This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. import { AppConstants } from "resource://gre/modules/AppConstants.sys.mjs"; export const ZenCustomizab...
fim
zen-browser/desktop
javascript
<|fim_suffix|>let buttonPressed = Services.prompt.confirmEx( win, title.value, message.value, Services.prompt.BUTTON_POS_0 * Services.prompt.BUTTON_TITLE_IS_STRING + Services.prompt.BUTTON_POS_1 * Services.prompt.BUTTON_TITLE_IS_STRING, ...
fim
zen-browser/desktop
javascript
<|fim_prefix|>// This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. import { ZenUIComponent } from "resource:///modules/zen/ui/ZenUIComponent.sys.mjs"; const WAIT_BEFORE_...
fim
zen-browser/desktop
javascript
<|fim_prefix|>// This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. import { ZenUIComponent } from "resource:///modules/zen/ui/ZenUIComponent.sys.mjs"; /** * Per-window ...
fim
zen-browser/desktop
javascript
// This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. /** * Base class for UI components in Zen. * UI components are responsible for managing their own event listeners ...
fim
zen-browser/desktop
javascript
<|fim_suffix|>rkspaceIcon": gZenWorkspaces.changeWorkspaceIcon(); break; case "cmd_zenReorderWorkspaces": gZenUIManager.showToast("zen-workspaces-how-to-reorder-title", { timeout: 9000, descriptionId: "zen-workspaces-how-to-reorder-desc", ...
fim
zen-browser/desktop
javascript
<|fim_suffix|> { selectedBrowser.style.paddingRight = ""; }, { once: true } ); } }, get elementSeparation() { return Math.min( Services.prefs.getIntPref("zen.theme.content-element-separation"), kZenMaxElementSeparation ); }, /**...
fim
zen-browser/desktop
javascript
<|fim_prefix|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ /* eslint-disable consistent-return */ const lazy = {}; XPCOMUtils.defineLazyPreferenceGetter( ...
fim
zen-browser/desktop
javascript
<|fim_prefix|>// This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. import { nsZenDOMOperatedFeature, nsZenMultiWindowFeature, } from "chrome://browser/content/zen-com...
fim
zen-browser/desktop
javascript
<|fim_suffix|>DropElement = lastPossibleDropElement?.elementIndex; if (Number.isInteger(maxElementIndexForDropElement)) { let index = Math.min( oldDropElementIndex, maxElementIndexForDropElement ); let oldDropElementCandidate = this._ta...
fim
zen-browser/desktop
javascript
<|fim_prefix|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nsZenDragAndDrop.h" #include "nsBaseDragService.h" namespace zen { namespace { static co...
fim
zen-browser/desktop
cpp
<|fim_suffix|>ER_CONTRACTID "@mozilla.org/zen/drag-and-drop;1" namespace zen { /** * @brief Implementation of the nsIZenDragAndDrop interface. * When we want to do a drag and drop operation, web standards * don't really allow much customization of the drag image. * This class allows Zen to have more control over ...
fim
zen-browser/desktop
c
<|fim_suffix|>unpinned via this setter. * This no-op setter ensures compatibility with interfaces expecting a pinned property, * while preserving the invariant that ZenFolders cannot have their pinned state changed externally. */ set pinned(value) {} get iconURL() { return this.icon.querySelector("ima...
fim
zen-browser/desktop
javascript
// This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. import { nsZenDOMOperatedFeature } from "chrome://browser/content/zen-components/ZenCommonUtils.mjs"; function forma...
fim
zen-browser/desktop
javascript
<|fim_suffix|>lement-preview" ); if (elementPreview) { elementPreview.remove(); } this.#finalizeGlanceClosing(setNewID, resolve, onTabClose); }); }); } /** * Create closing data from original position for arc animation * * @param {object} ori...
fim
zen-browser/desktop
javascript
<|fim_suffix|>efault(); event.stopPropagation(); this.#openGlance(href, principal); } on_keydown(event) { if (event.defaultPrevented || event.key !== "Escape") { return; } this.sendAsyncMessage("ZenGlance:CloseGlance", { hasFocused: this.contentWindow.document.activeElement ...
fim
zen-browser/desktop
javascript
<|fim_prefix|>// This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. /* eslint-disable consistent-return */ export class ZenGlanceParent extends JSWindowActorParent { co...
fim
zen-browser/desktop
javascript
<|fim_suffix|>l: "https://example.com", clientX: 0, clientY: 0, width: 0, height: 0, triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(), }) .then(async glanceTab => { await callback(glanceTab); if (close) { win...
fim
zen-browser/desktop
javascript
<|fim_prefix|>// This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. import { nsZenMultiWindowFeature } from "chrome://browser/content/zen-components/ZenCommonUtils.mjs"; ...
fim
zen-browser/desktop
javascript
<|fim_prefix|>// This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. const lazy = {}; ChromeUtils.defineESModuleGetters(lazy, { NetUtil: "resource://gre/modules/NetUtil.sy...
fim
zen-browser/desktop
javascript
<|fim_prefix|>// This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. const lazy = {}; ChromeUtils.defineESModuleGetters(lazy, { JSONFile: "resource://gre/modules/JSONFile...
fim
zen-browser/desktop
javascript
<|fim_suffix|>.#timeAgo(liveFolder.state.lastFetched) }, disabled: true, }, { key: "setInterval", l10nId: "zen-live-folder-option-fetch-interval", options: intervals, }, { key: "refresh", l10nId: "zen-live-folder-refresh", ...
fim
zen-browser/desktop
javascript
<|fim_prefix|>// This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. import { nsZenLiveFolderProvider } from "resource:///modules/zen/ZenLiveFolder.sys.mjs"; export class ...
fim
zen-browser/desktop
javascript
<|fim_prefix|>// This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. import { nsZenLiveFolderProvider } from "resource:///modules/zen/ZenLiveFolder.sys.mjs"; const lazy = ...
fim
zen-browser/desktop
javascript
<|fim_prefix|>// This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. const lazy = {}; XPCOMUtils.defineLazyPreferenceGetter( lazy, "RESPECT_PIP_DISABLED", "media.vide...
fim
zen-browser/desktop
javascript
<|fim_suffix|> = new nsZenMods(); <|fim_prefix|>// This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. import { nsZenPreloadedFeature, nsZenMultiWindowFeature, } from "...
fim
zen-browser/desktop
javascript
<|fim_suffix|>ult rv = chromeFile->Create(nsIFile::NORMAL_FILE_TYPE, 0644); if (NS_FAILED(rv)) { return nullptr; } } LoadSheetFile(chromeFile, css::eUserSheetFeatures); return mModsSheet; } auto ZenStyleSheetCache::LoadSheetFile(nsIFile* aFile, css::SheetPars...
fim
zen-browser/desktop
cpp
<|fim_prefix|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef mozilla_ZenStyleSheetCache_h_ #define mozilla_ZenStyleSheetCache_h_ #include "mozilla/css/L...
fim
zen-browser/desktop
c
<|fim_suffix|>classList.add("hidden"); const themeId = actionButton.getAttribute("zen-theme-id"); if (await this.isThemeInstalled(themeId)) { actionButtonUninstall.classList.remove("hidden"); } else { actionButton.classList.remove("hidden"); } actionButton.addEventListener( "clic...
fim
zen-browser/desktop
javascript
<|fim_prefix|>// This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. export class ZenModsMarketplaceParent extends JSWindowActorParent { constructor() { super(); } ...
fim
zen-browser/desktop
javascript
<|fim_prefix|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nsZenModsBackend.h" #include "nsIXULRuntime.h" #include "nsStyleSheetService.h" #include...
fim
zen-browser/desktop
cpp
<|fim_prefix|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef mozilla_ZenModsBackend_h_ #define mozilla_ZenModsBackend_h_ #include "nsIZenModsBackend.h" ...
fim
zen-browser/desktop
c
<|fim_suffix|>n because we haven't // gotten the opportunity to save the session yet. if (this._shouldRunMigration) { initialState = this.#runStateMigration(initialState); } // Clear the memory of the groups saved in the session file, // as we don't really need them anyways. if (initialSta...
fim
zen-browser/desktop
javascript
<|fim_prefix|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* eslint-disable consistent-return */ import { XPCOMUtils } from "resource://gre/modules/XPCOMUtil...
fim
zen-browser/desktop
javascript
<|fim_suffix|>r"); popupElement.appendChild(sectionHeader); let availOptions = []; let createXulItem = (text, id, iconPath = null) => { if (text === "sep") { popupElement.appendChild(this.doc.createXULElement("menuseparator")); return; } availOptions.push(id || text); ...
fim
zen-browser/desktop
javascript
<|fim_suffix|> actually exists. return !!win.gZenWorkspaces.getWorkspaceFromId(targetRoute); } /** * Checks if the tab should be processed or not * * @param {object} options - The tab creation options * @param {Window} win - The owning window * @returns {SKIP_TYPE} The type of skip or null if no...
fim
zen-browser/desktop
javascript
<|fim_prefix|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ import { nsZenMultiWindowFeature } from "chrome://browser/content/zen-components/ZenCommonUtils.mjs"...
fim
zen-browser/desktop
javascript
<|fim_prefix|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ import { nsZenFold<|fim_suffix|>his.collapsiblePins.collapsed = false; } }); const ta...
fim
zen-browser/desktop
javascript
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ // Integration of workspace-specific bookmarks into Places window.ZenWorkspaceBookmarksStorage = { lazy: {}, ...
fim
zen-browser/desktop
javascript
<|fim_prefix|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ class nsZenWorkspaceCreation extends MozXULElement { #wasInCollapsedMode = false; promiseInitia...
fim
zen-browser/desktop
javascript
<|fim_prefix|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ class nsZenWorkspaceIcons extends MozXULElement { #hasConnected = false; connectedCallback() { ...
fim
zen-browser/desktop
javascript
<|fim_suffix|>.isGestureActive) { return; } const stripWidth = this.#stripWidth; event.preventDefault(); event.stopPropagation(); const delta = event.delta * Services.prefs.getIntPref( "zen.workspaces.swipe-actions.delta-multiplier" ); let translateX = this._sw...
fim
zen-browser/desktop
javascript
<|fim_prefix|>// This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. /* eslint-disable consistent-return */ import { nsZenDOMOperatedFeature } from "chrome://browser/conte...
fim
zen-browser/desktop
javascript
<|fim_suffix|>nd appended, * "exists" if the promo already exists, or false if the section is not empty. */ export function createZenEssentialsPromo(container = undefined) { if (container === undefined) { container = gZenWorkspaces.getCurrentSpaceContainerId(); } const section = gZenWorkspaces.getEssential...
fim
zen-browser/desktop
javascript
<|fim_prefix|>// This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. import { nsZenDOMOperatedFeature } from "chrome://browser/content/zen-components/ZenCommonUtils.mjs"; ...
fim
zen-browser/desktop
javascript
<|fim_suffix|>Content = "Text 2"; container.appendChild(child1); container.appendChild(child2); doc.body.appendChild(container); const component = new SelectorComponent(doc, null, [], () => {}); for (let i = 0; i <= 7; i++) { const path = component.getSelectionPath(doc, i, child2); ok( path, ...
fim
zen-browser/desktop
javascript
<|fim_prefix|>/* Any copyright is dedicated to the Public Domain. https://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; // Covers code paths the basic/invalid/nthchild tests don't: // - getIdentification() running ids/classes through CSS.escape() // - the ancestor-disambiguation while-loop in trave...
fim
zen-browser/desktop
javascript
<|fim_prefix|>/* Any copyright is dedicated to the Public Domain. https://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; add_task(async function test_getSelectionPath_invalidNode() { const doc = document.implementation.createHTMLDocument("TestInvalid"); const<|fim_suffix|> should return null" );...
fim
zen-browser/desktop
javascript
<|fim_prefix|>/* Any copyright is dedicated to the Public Domain. https://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; add_task(async function test_getSelectionPath_nthchild() { const doc = document.implementation.createHTMLDocument("TestDoc"); const childCount = 10; const container = doc.cre...
fim
zen-browser/desktop
javascript
<|fim_prefix|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; // The compositor animation path in AnimationInfo.cpp resolves a colour with // the h...
fim
zen-browser/desktop
javascript
<|fim_prefix|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; // Verifies that activating a boost on a tab moves the painted colour of a // plain C...
fim
zen-browser/desktop
javascript
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; // Borders go through nsCSSRendering::ComputeBorderColors → CalcColor with the // frame, so the boo...
fim
zen-browser/desktop
javascript
<|fim_prefix|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; // CSS linear-gradient stops are resolved via the nsCSSGradientRenderer + // ColorSto...
fim
zen-browser/desktop
javascript
<|fim_prefix|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; // The "twice" diagnostic: paint an inline SVG fil<|fim_suffix|>SON.stringify( ...
fim
zen-browser/desktop
javascript
<|fim_prefix|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If <|fim_suffix|>ser, point.x, point.y); await setBoost(browser, { accent: PAGE_ACCENT, complementaryRotation: PAGE_COMPLEMENTARY_ROTATION, }); const boosted = await pixelAt(browser, point.x...
fim
zen-browser/desktop
javascript
<|fim_suffix|>accent: 0, inverted: true }); const whiteOn = await pixelInElement(browser, "#white"); const blackOn = await pixelInElement(browser, "#black"); Assert.less( pxLuma(whiteOn), pxLuma(whiteOff), "white must darken under invert; double-invert would leave it bright" ); As...
fim
zen-browser/desktop
javascript
<|fim_suffix|>browser, { accent: 0 }); const baseline = await pixelAt(browser, point.x, point.y); Assert.ok( pixelsClose(baseline, { r: 120, g: 120, b: 120 }, 5), `baseline outline ≈ rgb(120,120,120); got ${JSON.stringify(baseline)}` ); await setBoost(browser, { accent: PAGE_ACCENT, ...
fim
zen-browser/desktop
javascript
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; // `::placeholder` is an element-backed pseudo inside a text-control's UA // widget shadow tree. Th...
fim
zen-browser/desktop
javascript
<|fim_suffix|>r(baseline, boosted, 3), `::before background must tint with the boost; baseline=${JSON.stringify( baseline )} boosted=${JSON.stringify(boosted)}` ); }); }); <|fim_prefix|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the ...
fim
zen-browser/desktop
javascript
<|fim_suffix|>ed transparent). Assert.equal(boosted.a, 255, "composited shadow pixel has full alpha"); }); }); <|fim_prefix|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.o...
fim
zen-browser/desktop
javascript
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; // `background-image: url(*.svg)` goes through nsImageRenderer's WebRender // blob path, which is a...
fim
zen-browser/desktop
javascript
<|fim_suffix|>ge document's // PresContext. Compare the painted colour of an <img>-rendered SVG to an // inline <svg> with the same fill — both should land at the same boosted // colour after one pass. add_task(async function svg_as_img_matches_inline_under_boost() { const svgSrc = encodeURIComponent( `<svg xmlns...
fim
zen-browser/desktop
javascript
<|fim_suffix|>t="200" fill="url(#grad)"/> </svg>`; await BrowserTestUtils.withNewTab(dataUrl(html), async browser => { await waitForRepaint(browser); const points = await SpecialPowers.spawn(browser, [], () => { const r = content.document.querySelector("#g").getBoundingClientRect(); return {...
fim
zen-browser/desktop
javascript
<|fim_suffix|>ne = await pixelInElement(browser, "#used"); Assert.ok( pixelsClose(directBaseline, usedBaseline, 3), `baseline mismatch between direct and used; direct=${JSON.stringify( directBaseline )} used=${JSON.stringify(usedBaseline)}` ); await setBoost(browser, { accen...
fim
zen-browser/desktop
javascript
<|fim_suffix|>filter that inverts the // luminance direction would flip this. const bg = await pixelAt(browser, 5, 5); Assert.greater( pxLuma(bg), pxLuma(boosted), "boosted text must remain darker than its boosted white background" ); }); }); <|fim_prefix|>/* This Source Code Form is...
fim
zen-browser/desktop
javascript
<|fim_prefix|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not d<|fim_suffix|>e // boost paint paths it's meant to catch. // Construct an nscolor in Firefox's ABGR encoding from RGB + the alpha byte. // The boost backend reuses the alpha byte as th...
fim
zen-browser/desktop
javascript
<|fim_prefix|>/* Any copyright is dedicated to the Public Domain. https://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; function goToRightSideTabs(<|fim_suffix|> await SpecialPowers.pushPrefEnv({ set: [["zen.tabs.vertical.right-side", true]], }); // eslint-disable-next-line mozilla/no-a...
fim
zen-browser/desktop
javascript
<|fim_prefix|>/* Any copyright is dedicated to the Public Domain. https://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; add_task(async function test_Container_Essentials_Auto_Swithc() { await gZenWorkspaces.createAndSaveWorkspace( "Container Profile 1", undefined, false, 1 ); co...
fim
zen-browser/desktop
javascript
<|fim_prefix|>/* Any copyright is dedicated to the Public Domain. https://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; add_task(async function test_Check_Creation() { await gZenWorkspaces.createAndSaveWorkspace( "Container Profile 1", undefined, false, 1 ); const workspaces = g...
fim
zen-browser/desktop
javascript
<|fim_suffix|>ask(async function test_Basic_Toggle() { const folder = await gZenFolders.createFolder([], { renameFolder: false, label: "subfolder", }); ok(!folder.collapsed, "Folder should not be collapsed by default"); folder.labelElement.click(); ok(folder.collapsed, "Folder should be collapsed af...
fim
zen-browser/desktop
javascript
<|fim_prefix|>/* Any copyright is dedicated to the Public Domain. https://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; add<|fim_suffix|>t:blank"); const folder = await gZenFolders.createFolder([tab], { renameFolder: false, label: "test", }); ok(folder, "Folder created successfully"); ...
fim
zen-browser/desktop
javascript
<|fim_suffix|>l( tabRect.height, folderRect.height, "Folder height matches tab height" ); Assert.equal( tabRect.width, folderRect.width, "Folder width matches tab width" ); gUIDensity.update(); await removeFolder(folder); }); <|fim_prefix|>/* Any copyright is dedicated to the Public D...
fim
zen-browser/desktop
javascript
<|fim_suffix|>tab" ); folder.appendChild(tab2); Assert.equal(folder.tabs.length, 3, "Folder should contain the second tab"); ok( folder.tabs[0].hasAttribute("zen-empty-tab"), "First tab should be an empty tab" ); await removeFolder(folder); }); <|fim_prefix|>/<|fim_middle|>* Any copyright is dedic...
fim
zen-browser/desktop
javascript
<|fim_prefix|>/* Any copyright is dedicated to the Public Domain. https://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; a<|fim_suffix|>should be collapsed after clicking on it"); ok( !parent.collapsed, "Parent folder should be collapsed after clicking on subfolder" ); await removeFolde...
fim
zen-browser/desktop
javascript
<|fim_suffix|>r([tab1, tab2], {}); gBrowser.selectedTab = tab2; gBrowser.addRangeToMultiSelectedTabs(tab1, tab2); ok(tab1.multiselected, "Tab 1 should be multiselected"); ok(tab2.multiselected, "Tab 2 should be multiselected"); Assert.equal( gBrowser.multiSelectedTabsCount, 2, "There should be 2...
fim
zen-browser/desktop
javascript
<|fim_suffix|> level 1"); await removeFolder(parent); }); <|fim_prefix|>/* Any copyright is dedicated to the Public Domain. https://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; add_task(async function test_Issue_9885() { const subfolder = await gZenFolders.createFolder([], { renameFolder: f...
fim
zen-browser/desktop
javascript
<|fim_suffix|>vent = BrowserTestUtils.waitForEvent( window, "TabGroupCreate" ); EventUtils.synthesizeMouseAtCenter(subfolderItem, {}); await folderCreateEvent; const items = currentFolder.allItems; Assert.equal(items.length, 2, `Folder should have 2 items`); ok(gBrowser.isTabGroup(it...
fim
zen-browser/desktop
javascript
<|fim_suffix|>"There should be 2 multiselected tabs" ); const collapseEvent = BrowserTestUtils.waitForEvent( window, "TabGroupCollapse" ); folder.collapsed = true; await collapseEvent; ok(tab2.multiselected, "Tab 2 should not be multiselected"); Assert.equal( gBrowser.multiSelectedTabsCount,...
fim
zen-browser/desktop
javascript
<|fim_prefix|>/* Any copyright is dedicated to the Public Domain. https://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; add_task(async function test_Duplicate_Tab_Inside_Folder() { await SpecialPowers.pushPrefEnv({ set: [["zen.folders.owned-tabs-in-folder", true]], }); const selectedTab = g...
fim
zen-browser/desktop
javascript
<|fim_prefix|>/* Any copyright is dedicated to the Public Domain. https://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; add_task(async function test_Issue_() { const <|fim_suffix|>k( tab1.hasAttribute("folder-active"), "Tab 1 should be in the active folder" ); ok( tab2.hasAttribute(...
fim
zen-browser/desktop
javascript
<|fim_prefix|>/* Any copyright is dedicated to the Public Domain. https://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; add_task(async function<|fim_suffix|>(gBrowser, "data:text/html,tab2"); const subfolder = await gZenFolders.createFolder([tab], { renameFolder: false, label: "subfolder", ...
fim
zen-browser/desktop
javascript
<|fim_prefix|>/* Any copyright is dedicated to the Public Domain. https://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; add_task(async function test_Not_Visible_Collapsed() { const tab = BrowserTestUtils.addTab(gBrowser, "data:text/html,tab1"); const folder = await gZenFolders.createFolder([tab])...
fim
zen-browser/desktop
javascript
<|fim_suffix|>} async function addTabTo( targetBrowser, url = "http://mochi.test:8888/", params = {} ) { params.skipAnimation = true; const tab = BrowserTestUtils.addTab(targetBrowser, url, params); const browser = targetBrowser.getBrowserForTab(tab); await BrowserTestUtils.browserLoaded(browser); retu...
fim
zen-browser/desktop
javascript
<|fim_suffix|>ute" ); }); }); <|fim_prefix|>/* Any copyright is dedicated to the Public Domain. https://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; add_task(async function test_Glance_Basic_Open() { await openGlanceOnTab(async glanceTab => { ok( glanceTab.hasAttribute("zen-glance-...
fim
zen-browser/desktop
javascript
<|fim_suffix|>( !currentTab.hasAttribute("glance-id"), "The glance tab should not have the zen-glance-tab attribute" ); await BrowserTestUtils.removeTab(glanceTab); }, false); }); <|fim_prefix|>/* Any copyright is dedicated to the Public Domain. https://creativecommons.org/publicdomain/zero/1.0...
fim
zen-browser/desktop
javascript
<|fim_suffix|>selected, "The original tab should be visually selected"); }); add_task(async function test_Glance_Close_With_Next_Tab() { const originalTab = gBrowser.selectedTab; await BrowserTestUtils.withNewTab( { url: "https://example.com", gBrowser, waitForLoad: false }, async function () { const...
fim
zen-browser/desktop
javascript
<|fim_prefix|>/* Any copyright is dedicated to the Public Domain. https://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; add_task(async function test_Glance_Basic_Open() { const selectedTab = gBrowser.selectedTab; await openGlanceOnTab(async glanceTab => { await gZenGlanceManager.fullyOpenGlan...
fim
zen-browser/desktop
javascript
<|fim_suffix|> await BrowserTestUtils.removeTab(gBrowser.selectedTab); }); <|fim_prefix|>/* Any copyright is dedicated to the Public Domain. https://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; add_task(async function test_Glance_Next_Tab() { const tabToCheck = gBrowser.selectedTab; await Browse...
fim
zen-browser/desktop
javascript
<|fim_suffix|> resolve(); }); }); await BrowserTestUtils.removeTab(tabToCheck); }); }); <|fim_prefix|>/* Any copyright is dedicated to the Public Domain. https://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; add_task(async function test_Glance_Prev_Tab() { await openGlanceOn...
fim
zen-browser/desktop
javascript
<|fim_suffix|>lanceTab); await BrowserTestUtils.waitForCondition(() => { return glanceTab.selected; }); ok(true, "The glance tab should be selected"); await BrowserTestUtils.removeTab(tabToRemove); }); }); <|fim_prefix|>/* Any copyright is dedicated to the Public Domain. https://creat<|fim_mi...
fim
zen-browser/desktop
javascript
<|fim_prefix|>/* Any copyright is dedicated to the Public Domain. https://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; // Regression test for gh-14049: closing a Glance ("preview") opened from a // pinned tab in a pinned-only window used to drop the user on a blank new tab // instead of restoring th...
fim
zen-browser/desktop
javascript
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ const { openGlanceOnTab: internalGlanceHandle } = ChromeUtils.importESModule( "resource://testing-common/GlanceT...
fim
zen-browser/desktop
javascript
<|fim_prefix|>/* Any copyright is dedicated to the Public Domain. https://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; ChromeUtils.defineESModuleGetters(this, { sinon: "resource://testing-common/Sinon.sys.mjs", nsGithubLiveFolderProvider: "resource:///modules/zen/GithubLiveFolder.sys.mjs", }...
fim
zen-browser/desktop
javascript
<|fim_suffix|>nc () => { const { fetchStub } = createInstance({ id: "test-folder-interval-change", interval: INTERVAL, lastFetched: Date.now(), }); instance.start(); sinon.assert.notCalled(fetchStub); await sleep(INTERVAL + INTERVAL_OFFSET); Assert.equal( fetchStub.call...
fim
zen-browser/desktop
javascript
<|fim_suffix|> timeRange: 0 }); const updated = new Date().toISOString(); const atomXml = ` <feed xmlns="http://www.w3.org/2005/Atom"> <title>Atom Feed</title> <entry> <title>Bad scheme</title> <link href="javascript:alert(1)" /> <id>urn:uuid:bad</id> <updated>${upda...
fim
zen-browser/desktop
javascript
<|fim_suffix|>vicii", "artist updates live alongside the title" ); } finally { await pauseVideoIn(mediaTab); BrowserTestUtils.removeTab(mediaTab); gBrowser.selectedTab = originalTab; } }); <|fim_prefix|>/* Any copyright is dedicated to the Public Domain. https://creativecommons.org/publicdo...
fim
zen-browser/desktop
javascript
<|fim_suffix|>dition: playing tab starts unmuted" ); ok( !mediaBar().hasAttribute("muted"), "precondition: media bar has no muted attribute" ); clickMediaButton("zen-media-mute-button"); await BrowserTestUtils.waitForCondition( () => mediaTab.linkedBrowser.audioMuted, "tab b...
fim
zen-browser/desktop
javascript
<|fim_prefix|>/* Any copyright is dedicated to the Public Domain. https://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; // User flow: // 1. A music page registers a "nexttrack" action handler (like most // streaming sites do). // 2. User is on another tab, media bar is showing with the next-...
fim
zen-browser/desktop
javascript
<|fim_suffix|>" ); } finally { await pauseVideoIn(mediaTab); BrowserTestUtils.removeTab(mediaTab); gBrowser.selectedTab = originalTab; } }); <|fim_prefix|>/* Any copyright is dedicated to the Public Domain. https://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; // User flow: // 1...
fim
zen-browser/desktop
javascript