Path: blob/main/src/vs/workbench/test/browser/webview.test.ts
4778 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45import assert from 'assert';6import { parentOriginHash } from '../../../base/browser/iframe.js';7import { ensureNoDisposablesAreLeakedInTestSuite } from '../../../base/test/common/utils.js';89suite('parentOriginHash', () => {1011test('localhost 1', async () => {12const hash = await parentOriginHash('http://localhost:9888', '123456');13assert.strictEqual(hash, '0fnsiac2jaup1t266qekgr7iuj4pnm31gf8r0h1o6k2lvvmfh6hk');14});1516test('localhost 2', async () => {17const hash = await parentOriginHash('http://localhost:9888', '123457');18assert.strictEqual(hash, '07shf01bmdfrghk96voldpletbh36vj7blnl4td8kdq1sej5kjqs');19});2021test('localhost 3', async () => {22const hash = await parentOriginHash('http://localhost:9887', '123456');23assert.strictEqual(hash, '1v1128i162q0nee9l89360sqan26u3pdnjrkke5ijd0sel8sbtqf');24});2526ensureNoDisposablesAreLeakedInTestSuite();27});282930