forked from web-platform-tests/wpt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
registerProtocolHandler
tests for FTP.
`registerProtocolHandler` allows registering `ftp`, `ftps`, and `sftp` protocols as of whatwg/html#6584. This change adds tests to ensure that `registerProtocolHandler` allows registering those protocols and to ensure that embedded credentials are removed prior to invoking the custom protocol handler.
- Loading branch information
Showing
3 changed files
with
56 additions
and
8 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
...and-capabilities/the-navigator-object/protocol-handler-path-credentials-manual.https.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<!doctype html> | ||
<!-- Tests that embedded credentials are removed when invoking a custom | ||
protocol handler registered via registerProtocolHandler. --> | ||
<meta charset=windows-1254> | ||
<meta name=timeout content=long> | ||
<title>registerProtocolHandler() and a handler with %s in the path</title> | ||
<script src=/resources/testharness.js></script> | ||
<script src=/resources/testharnessreport.js></script> | ||
<script src=/service-workers/service-worker/resources/test-helpers.sub.js></script> | ||
<script> | ||
|
||
// Configure expectations for individual test | ||
window.type = "path"; | ||
window.noSW = false; | ||
window.scheme = 'ftp'; | ||
|
||
function runCredentialstest() { | ||
runTest({ | ||
credentialsPart: "username:password", | ||
hostPart: "hostname.example" | ||
}); | ||
} | ||
</script> | ||
<script src=resources/handler-tools.js></script> | ||
<ol> | ||
<li><p>First, register the handler: <button onclick='register()'>Register</button>. | ||
<li><p>Then, run the test: <button onclick='runCredentialstest()'>Run</button>. | ||
</ol> | ||
<div id=log></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters