mirror of
https://github.com/sky-systems/sky_phone.git
synced 2026-09-04 09:13:24 +00:00
ADD - expand phone application platform
Add the Companies app, resilient call handling, custom app registry, vendor compatibility, storage policies, frontend bridge, tests, documentation, config, locale, and SQL migrations.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
|
||||
import { isTrustedRootMessageSource } from '@/utils/windowMessages'
|
||||
|
||||
describe('root window message source', () => {
|
||||
it('accepts native NUI messages and messages posted by the root window', () => {
|
||||
const rootWindow = {} as Window
|
||||
|
||||
expect(isTrustedRootMessageSource(null, rootWindow)).toBe(true)
|
||||
expect(isTrustedRootMessageSource(rootWindow, rootWindow)).toBe(true)
|
||||
})
|
||||
|
||||
it('rejects messages posted by child frames', () => {
|
||||
const rootWindow = {} as Window
|
||||
const childFrame = {} as Window
|
||||
|
||||
expect(isTrustedRootMessageSource(childFrame, rootWindow)).toBe(false)
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user