Swift: Add a webview test case from a branch that didn't make it.

This commit is contained in:
Geoffrey White 2023-01-27 16:45:49 +00:00
Родитель c6bc1a3f3a
Коммит 838a00bbc9
1 изменённых файлов: 20 добавлений и 0 удалений

Просмотреть файл

@ -52,6 +52,7 @@ protocol Exported : JSExport {
var tainted: Any { get }
func tainted(arg1: Any, arg2: Any)
}
class ExportedImpl : Exported {
var tainted: Any { get { return "" } }
@ -80,3 +81,22 @@ extension Extended : WKNavigationDelegate {
func webView(_: WKWebView, decidePolicyFor: WKNavigationAction, preferences: WKWebpagePreferences, decisionHandler: (WKNavigationActionPolicy, WKWebpagePreferences) -> Void) {} // $ source=remote
func webView(_: WKWebView, decidePolicyFor: WKNavigationAction, decisionHandler: (WKNavigationActionPolicy) -> Void) {} // $ source=remote
}
// ---
typealias JSExportAlias = JSExport
protocol Exported2 : JSExportAlias {
var tainted: Any { get }
}
typealias Exported2Alias = Exported2
class ExportedImpl2 : Exported2Alias {
var tainted: Any { get { return "" } }
var notTainted: Any { get { return ""} }
func readFields() {
tainted // $ source=remote
notTainted
}
}