-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implementing the set_rph_registration_mode testdriver
This new WebDriver extension command allows to registerProtocolHandler method of the HTML API to operate under an automatic mode. This PR defines also new automated tests for the registerProtocolHandler based on the manual tests that we alaready have.
- Loading branch information
1 parent
2c5fe89
commit e57b2f4
Showing
10 changed files
with
207 additions
and
3 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
...tem-state-and-capabilities/the-navigator-object/protocol-handler-fragment-nosw.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,25 @@ | ||
<!doctype html> | ||
<!-- Use a non-UTF-8 encoding to see how the handler URL is parsed --> | ||
<meta charset=windows-1254> | ||
<meta name=timeout content=long> | ||
<title>registerProtocolHandler() and a handler with %s in the fragment (does not use a service worker)</title> | ||
<script src=/resources/testharness.js></script> | ||
<script src=/resources/testharnessreport.js></script> | ||
<script src="/resources/testdriver.js"></script> | ||
<script src="/resources/testdriver-vendor.js"></script> | ||
<script src=/service-workers/service-worker/resources/test-helpers.sub.js></script> | ||
<script> | ||
'use strict'; | ||
promise_setup(async () => { | ||
await test_driver.set_rph_registration_mode("autoAccept"); | ||
await test_driver.bless('handler registration'); | ||
register(); | ||
}); | ||
// Configure expectations for individual test | ||
window.type = "fragment"; | ||
window.noSW = true; | ||
</script> | ||
<script src=resources/handler-tools.js></script> | ||
<script> | ||
runTest(); | ||
</script> |
25 changes: 25 additions & 0 deletions
25
...s/system-state-and-capabilities/the-navigator-object/protocol-handler-fragment.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,25 @@ | ||
<!doctype html> | ||
<!-- Use a non-UTF-8 encoding to see how the handler URL is parsed --> | ||
<meta charset=windows-1254> | ||
<meta name=timeout content=long> | ||
<title>registerProtocolHandler() and a handler with %s in the fragment</title> | ||
<script src=/resources/testharness.js></script> | ||
<script src=/resources/testharnessreport.js></script> | ||
<script src="/resources/testdriver.js"></script> | ||
<script src="/resources/testdriver-vendor.js"></script> | ||
<script src=/service-workers/service-worker/resources/test-helpers.sub.js></script> | ||
<script> | ||
'use strict'; | ||
promise_setup(async () => { | ||
await test_driver.set_rph_registration_mode("autoAccept"); | ||
await test_driver.bless('handler registration'); | ||
register(); | ||
}); | ||
// Configure expectations for individual test | ||
window.type = "fragment"; | ||
window.noSW = false; | ||
</script> | ||
<script src=resources/handler-tools.js></script> | ||
<script> | ||
runTest(); | ||
</script> |
25 changes: 25 additions & 0 deletions
25
...papis/system-state-and-capabilities/the-navigator-object/protocol-handler-path.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,25 @@ | ||
<!doctype html> | ||
<!-- Use a non-UTF-8 encoding to see how the handler URL is parsed --> | ||
<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="/resources/testdriver.js"></script> | ||
<script src="/resources/testdriver-vendor.js"></script> | ||
<script src=/service-workers/service-worker/resources/test-helpers.sub.js></script> | ||
<script> | ||
'use strict'; | ||
promise_setup(async () => { | ||
await test_driver.set_rph_registration_mode("autoAccept"); | ||
await test_driver.bless('handler registration'); | ||
register(); | ||
}); | ||
// Configure expectations for individual test | ||
window.type = "path"; | ||
window.noSW = false; | ||
</script> | ||
<script src=resources/handler-tools.js></script> | ||
<script> | ||
runTest(); | ||
</script> |
25 changes: 25 additions & 0 deletions
25
...system-state-and-capabilities/the-navigator-object/protocol-handler-query-nosw.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,25 @@ | ||
<!doctype html> | ||
<!-- Use a non-UTF-8 encoding to see how the handler URL is parsed --> | ||
<meta charset=windows-1254> | ||
<meta name=timeout content=long> | ||
<title>registerProtocolHandler() and a handler with %s in the query (does not use a service worker)</title> | ||
<script src=/resources/testharness.js></script> | ||
<script src=/resources/testharnessreport.js></script> | ||
<script src="/resources/testdriver.js"></script> | ||
<script src="/resources/testdriver-vendor.js"></script> | ||
<script src=/service-workers/service-worker/resources/test-helpers.sub.js></script> | ||
<script> | ||
'use strict'; | ||
promise_setup(async () => { | ||
await test_driver.set_rph_registration_mode("autoAccept"); | ||
await test_driver.bless('handler registration'); | ||
register(); | ||
}); | ||
// Configure expectations for individual test | ||
window.type = "query"; | ||
window.noSW = true; | ||
</script> | ||
<script src=resources/handler-tools.js></script> | ||
<script> | ||
runTest(); | ||
</script> |
25 changes: 25 additions & 0 deletions
25
...apis/system-state-and-capabilities/the-navigator-object/protocol-handler-query.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,25 @@ | ||
<!doctype html> | ||
<!-- Use a non-UTF-8 encoding to see how the handler URL is parsed --> | ||
<meta charset=windows-1254> | ||
<meta name=timeout content=long> | ||
<title>registerProtocolHandler() and a handler with %s in the query</title> | ||
<script src=/resources/testharness.js></script> | ||
<script src=/resources/testharnessreport.js></script> | ||
<script src="/resources/testdriver.js"></script> | ||
<script src="/resources/testdriver-vendor.js"></script> | ||
<script src=/service-workers/service-worker/resources/test-helpers.sub.js></script> | ||
<script> | ||
'use strict'; | ||
promise_setup(async () => { | ||
await test_driver.set_rph_registration_mode("autoAccept"); | ||
await test_driver.bless('handler registration'); | ||
register(); | ||
}); | ||
// Configure expectations for individual test | ||
window.type = "query"; | ||
window.noSW = false; | ||
</script> | ||
<script src=resources/handler-tools.js></script> | ||
<script> | ||
runTest(); | ||
</script> |
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
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
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