| Index: LayoutTests/navigatorcontentutils/is-protocol-handler-registered.html
|
| diff --git a/LayoutTests/navigatorcontentutils/is-protocol-handler-registered.html b/LayoutTests/navigatorcontentutils/is-protocol-handler-registered.html
|
| index c015588eb72d2f1d91f65860245c6d39fdb8fd1f..f17a1a064b5d871d6a6662e43d8f7a4ca3e6ca75 100644
|
| --- a/LayoutTests/navigatorcontentutils/is-protocol-handler-registered.html
|
| +++ b/LayoutTests/navigatorcontentutils/is-protocol-handler-registered.html
|
| @@ -47,6 +47,21 @@ invalid_schemes.forEach(function (scheme) {
|
| debug('FAIL Invalid scheme "' + scheme + '" allowed. Threw exception: "' + errorMessage + '".');
|
| });
|
|
|
| +// Test that the API throws SecurityError exception if the URL's origin differs from the document's origin.
|
| +succeeded = false;
|
| +var errorMessage;
|
| +try {
|
| + window.navigator.isProtocolHandlerRegistered('web+myprotocol', "http://www.example.com/soup?url=%s");
|
| +} catch (e) {
|
| + succeeded = true;
|
| + errorMessage = e.message;
|
| +}
|
| +
|
| +if (succeeded)
|
| + debug('PASS Invalid url threw SecurityError exception: "' + errorMessage + '".');
|
| +else
|
| + debug('FAIL URL with origin different than document origin is allowed.');
|
| +
|
| debug("\nCheck if isProtocolHandlerRegistered() works correctly. If isProtocolHandlerRegistered() returns 'new' state, it works well.");
|
| debug("'bitcoin' protocol will be registered, and then checks if the 'bitcoin' protocol is registered by isProtocolHandlerRegistered().\n");
|
| try {
|
|
|