Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / navigatorcontentutils / is-protocol-handler-registered.html
index 3bc676b..0fd435a 100644 (file)
@@ -21,7 +21,7 @@ else
 var invalidUrl = "%S";
 var succeeded = false;
 try {
-    window.navigator.isProtocolHandlerRegistered(protocol, invalidUrl);
+    window.navigator.isProtocolHandlerRegistered(scheme, invalidUrl);
     succeeded = false;
 } catch (e) {
     succeeded = true;
@@ -37,7 +37,7 @@ invalid_schemes.forEach(function (scheme) {
     try {
         window.navigator.isProtocolHandlerRegistered(scheme, 'invalid scheme uri=%s');
     } catch (e) {
-        succeeded = 'SyntaxError' == e.name;
+        succeeded = 'SecurityError' == e.name;
         errorMessage = e.message;
     }
 
@@ -48,12 +48,12 @@ invalid_schemes.forEach(function (scheme) {
 });
 
 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");
+debug("'bitcoin' scheme will be registered, and then checks if the 'bitcoin' scheme is registered by isProtocolHandlerRegistered().\n");
 try {
-    // Register 'bitcoin' protocol for testing.
+    // Register 'bitcoin' scheme for testing.
     window.navigator.registerProtocolHandler('bitcoin', 'invalid scheme uri=%s', 'title');
 
-    var state = window.navigator.isProtocolHandlerRegistered("bitcoin", "valid protocol %s");
+    var state = window.navigator.isProtocolHandlerRegistered("bitcoin", "valid scheme %s");
     if (state == "registered")
         debug("PASS window.navigator.isProtocolHandlerRegistered returns 'registered' state. isProtocolHandlerRegistered() works correctly.");
     else if (state == "new")