mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
chore: run protocol tests in separate WebContents (#18202)
This commit is contained in:
File diff suppressed because it is too large
Load Diff
15
spec/fixtures/pages/jquery.html
vendored
15
spec/fixtures/pages/jquery.html
vendored
@@ -3,5 +3,20 @@
|
||||
<script src="../../static/jquery-2.0.3.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
window.ajax = (url, options) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
options.url = url
|
||||
options.cache = false
|
||||
options.success = (data, status, request) => {
|
||||
resolve({data, status: request.status, headers: request.getAllResponseHeaders()})
|
||||
}
|
||||
options.error = (xhr, errorType, error) => {
|
||||
reject(error ? error : xhr.status)
|
||||
}
|
||||
$.ajax(options)
|
||||
})
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user