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 URLRequestExtensionTests: XCTestCase {
func testIsPrivilegedWhenNormalURLRequestThenNotPrivileged() {
XCTAssertFalse(url.isPrivileged, "Should never be privileged")
}
func testIsPrivilegedWhenTestFixtureThenNotPrivileged() {
XCTAssertFalse(url.isPrivileged, "Should never be privileged")
}
func testIsPrivilegedWhenLocalHostThenNotPrivileged() {
let url = URLRequest(url: URL(string: "http://localhost:6571/reader-mode-page?url=https:example.com")!)
XCTAssertFalse(url.isPrivileged, "Not privileged since was not WKInternalURL.authorized")
}
func testIsPrivilegedWhenUseInternalSchemeThenNotPrivileged() {
XCTAssertFalse(url.isPrivileged, "Not privileged since was not WKInternalURL.authorized")
}
}