Revision control
Copy as Markdown
// 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
import XCTest
@testable import WebEngine
final class ReaderModeUtilsTests: XCTestCase {
func testContentSecurityPolicy_isSingleLine() {
XCTAssertFalse(csp.contains("\n"))
XCTAssertFalse(csp.contains("\r"))
}
func testContentSecurityPolicy_usesGivenOrigin() {
XCTAssertEqual(
csp,
"default-src 'none'; img-src *; style-src 'unsafe-inline' readermode://app; font-src readermode://app"
)
}
}