Skip to content
Permalink
Browse files
Add a test case for navigator.isProtocolHandlerRegistered
https://bugs.webkit.org/show_bug.cgi?id=128302

Reviewed by Anders Carlsson.

Add a test case for navigator.isProtocolHandlerRegistered. This new test will
check if "navigator.isProtocolHandlerRegistered" throws the proper exceptions
and returns a proper state of handler.

Currently, this function is only supported by EFL WK1 port.

* fast/dom/is-protocol-handler-registered-expected.txt: Added.
* fast/dom/is-protocol-handler-registered.html: Added.
* platform/efl-wk2/TestExpectations: Skip this test.
* platform/gtk/TestExpectations: ditto.
* platform/mac/TestExpectations: ditto.


Canonical link: https://commits.webkit.org/146379@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@163607 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Gyuyoung Kim committed Feb 7, 2014
1 parent e3b1925 commit 9ee3c49f8fc33802d19b3aedcf0bc03484026348
Showing 6 changed files with 76 additions and 0 deletions.
@@ -1,3 +1,22 @@
2014-02-06 Gyuyoung Kim <gyuyoung.kim@samsung.com>

Add a test case for navigator.isProtocolHandlerRegistered
https://bugs.webkit.org/show_bug.cgi?id=128302

Reviewed by Anders Carlsson.

Add a test case for navigator.isProtocolHandlerRegistered. This new test will
check if "navigator.isProtocolHandlerRegistered" throws the proper exceptions
and returns a proper state of handler.

Currently, this function is only supported by EFL WK1 port.

* fast/dom/is-protocol-handler-registered-expected.txt: Added.
* fast/dom/is-protocol-handler-registered.html: Added.
* platform/efl-wk2/TestExpectations: Skip this test.
* platform/gtk/TestExpectations: ditto.
* platform/mac/TestExpectations: ditto.

2014-02-06 Jeffrey Pfau <jpfau@apple.com>

loadSubframe can return null in SubframeLoader::loadOrRedirectSubframe
@@ -0,0 +1,6 @@
This test makes sure that navigator.isProtocolHandlerRegistered throws the proper exceptions and returns the default state of handler.

PASS window.navigator.isProtocolHandlerRegistered is defined.
PASS Invalid url "%S" threw SyntaxError exception.
PASS window.navigator.isProtocolHandlerRegistered returns "registered" state

@@ -0,0 +1,42 @@
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<p>This test makes sure that navigator.isProtocolHandlerRegistered throws the proper exceptions and returns the default state of handler.</p>
<pre id="console"></pre>
<script>
if (window.testRunner)
testRunner.dumpAsText();

if (window.navigator.isProtocolHandlerRegistered)
debug('PASS window.navigator.isProtocolHandlerRegistered is defined.');
else
debug('FAIL window.navigator.isProtocolHandlerRegistered is not defined.');

var invalidUrl = "%S";
var succeeded = false;
try {
window.navigator.isProtocolHandlerRegistered(protocol, invalidUrl);
succeeded = false;
} catch (e) {
succeeded = true;
}
if (succeeded)
debug('PASS Invalid url "' + invalidUrl + '" threw SyntaxError exception.');
else
debug('FAIL Invalid url "' + invalidUrl + '" allowed.');

try {
var state = window.navigator.isProtocolHandlerRegistered("bitcoin", "valid protocol %s");
if (state == "registered")
debug('PASS window.navigator.isProtocolHandlerRegistered returns "registered" state');
else
debug("FAIL window.navigator.isProtocolHandlerRegistered doesn't return the default state.");
} catch (e) {
debug('FAIL window.navigator.isProtocolHandlerRegistered call is failed: "' + e.message + '".');
}
</script>
</body>
</html>
@@ -287,6 +287,9 @@ svg/webarchive [ Skip ]
svg/custom/image-with-prefix-in-webarchive.svg [ Skip ]
http/tests/webarchive [ Skip ]

# isProtocolHandlerRegistered() isn't supported by WK2 yet.
webkit.org/b/92749 fast/dom/is-protocol-handler-registered.html [ Skip ]

# WebKitTestRunner needs an implementation for testRunner.titleTextDirection
webkit.org/b/93470 fast/dom/title-directionality-removeChild.html [ Failure ]
webkit.org/b/93470 fast/dom/title-directionality.html [ Failure ]
@@ -231,6 +231,9 @@ webkit.org/b/61661 editing/pasteboard/drag-drop-list.html [ Failure ]
webkit.org/b/117039 media/track/audio-track.html [ Skip ]
webkit.org/b/117039 media/track/video-track.html [ Skip ]

# isProtocolHandlerRegistered() isn't supported yet.
webkit.org/b/92749 fast/dom/is-protocol-handler-registered.html [ Skip ]

# Tests for MediaSource API. Feature is not totally functional.
webkit.org/b/99065 http/tests/media/media-source/mediasource-addsourcebuffer.html [ Failure Timeout ]
webkit.org/b/99065 http/tests/media/media-source/mediasource-append-buffer.html [ Crash Timeout ]
@@ -1086,6 +1086,9 @@ webkit.org/b/121331 http/tests/misc/submit-post-keygen.html [ Pass Failure Timeo
# Feature not implemented
webkit.org/b/91611 media/media-higher-prio-audio-stream.html [ Skip ]

# isProtocolHandlerRegistered() isn't supported yet.
webkit.org/b/92749 fast/dom/is-protocol-handler-registered.html [ Skip ]

# Snapshotted plugins not enabled on WK1
plugins/snapshotting [ Skip ]

0 comments on commit 9ee3c49

Please sign in to comment.