Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Side by Side Diff: LayoutTests/http/tests/navigatorcontentutils/unregister-protocol-handler-expected.txt

Issue 392993005: Custom handlers should throw SecurityError exception if the URL's origin differs from the document'… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Done Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 This test makes sure that navigator.unregisterProtocolHandler throws the proper exceptions and has no-op default implementation. 1 This test makes sure that navigator.unregisterProtocolHandler throws the proper exceptions and has no-op default implementation.
2 2
3 PASS window.navigator.unregisterProtocolHandler is defined. 3 PASS window.navigator.unregisterProtocolHandler is defined.
4 PASS Invalid scheme "http" threw SecurityError exception: "Failed to execute 'un registerProtocolHandler' on 'Navigator': The scheme 'http' doesn't belong to the scheme whitelist. Please prefix non-whitelisted schemes with the string 'web+'. ". 4 PASS Invalid scheme "http" threw SecurityError exception: "Failed to execute 'un registerProtocolHandler' on 'Navigator': The scheme 'http' doesn't belong to the scheme whitelist. Please prefix non-whitelisted schemes with the string 'web+'. ".
5 PASS Invalid scheme "https" threw SecurityError exception: "Failed to execute 'u nregisterProtocolHandler' on 'Navigator': The scheme 'https' doesn't belong to t he scheme whitelist. Please prefix non-whitelisted schemes with the string 'web+ '.". 5 PASS Invalid scheme "https" threw SecurityError exception: "Failed to execute 'u nregisterProtocolHandler' on 'Navigator': The scheme 'https' doesn't belong to t he scheme whitelist. Please prefix non-whitelisted schemes with the string 'web+ '.".
6 PASS Invalid scheme "file" threw SecurityError exception: "Failed to execute 'un registerProtocolHandler' on 'Navigator': The scheme 'file' doesn't belong to the scheme whitelist. Please prefix non-whitelisted schemes with the string 'web+'. ". 6 PASS Invalid scheme "file" threw SecurityError exception: "Failed to execute 'un registerProtocolHandler' on 'Navigator': The scheme 'file' doesn't belong to the scheme whitelist. Please prefix non-whitelisted schemes with the string 'web+'. ".
7 PASS Invalid scheme "web+" threw SecurityError exception: "Failed to execute 'un registerProtocolHandler' on 'Navigator': The scheme 'web+' is less than five cha racters long.". 7 PASS Invalid scheme "web+" threw SecurityError exception: "Failed to execute 'un registerProtocolHandler' on 'Navigator': The scheme 'web+' is less than five cha racters long.".
8 PASS Valid scheme "bitcoin" allowed. 8 PASS Valid scheme "bitcoin" allowed.
9 PASS Valid scheme "BitcoIn" allowed. 9 PASS Valid scheme "BitcoIn" allowed.
10 PASS Valid scheme "geo" allowed. 10 PASS Valid scheme "geo" allowed.
(...skipping 18 matching lines...) Expand all
29 PASS Valid scheme "WebCAL" allowed. 29 PASS Valid scheme "WebCAL" allowed.
30 PASS Valid scheme "wtai" allowed. 30 PASS Valid scheme "wtai" allowed.
31 PASS Valid scheme "WTAI" allowed. 31 PASS Valid scheme "WTAI" allowed.
32 PASS Valid scheme "xmpp" allowed. 32 PASS Valid scheme "xmpp" allowed.
33 PASS Invalid scheme "mailto:" falied. 33 PASS Invalid scheme "mailto:" falied.
34 PASS Invalid scheme "ssh:/" falied. 34 PASS Invalid scheme "ssh:/" falied.
35 PASS Invalid scheme "magnet:+" falied. 35 PASS Invalid scheme "magnet:+" falied.
36 PASS Invalid scheme "tel:sip" falied. 36 PASS Invalid scheme "tel:sip" falied.
37 PASS Invalid url "" threw SyntaxError exception.Failed to execute 'unregisterPro tocolHandler' on 'Navigator': The url provided ('') does not contain '%s'.". 37 PASS Invalid url "" threw SyntaxError exception.Failed to execute 'unregisterPro tocolHandler' on 'Navigator': The url provided ('') does not contain '%s'.".
38 PASS Invalid url "%S" threw SyntaxError exception.Failed to execute 'unregisterP rotocolHandler' on 'Navigator': The url provided ('%S') does not contain '%s'.". 38 PASS Invalid url "%S" threw SyntaxError exception.Failed to execute 'unregisterP rotocolHandler' on 'Navigator': The url provided ('%S') does not contain '%s'.".
39 PASS URL with origin different than document origin threw SecurityError exceptio n: "Failed to execute 'unregisterProtocolHandler' on 'Navigator': Can only regis ter custom handler in the document's origin.".
39 PASS Valid call succeeded. 40 PASS Valid call succeeded.
40 41
41 Check if unregisterProtocolHandler can unregister scheme correctly. If isProtoco lHandlerRegistered() returns 'new' state, unregisterProtoclHandler() works well. 42 Check if unregisterProtocolHandler can unregister scheme correctly. If isProtoco lHandlerRegistered() returns 'new' state, unregisterProtoclHandler() works well.
42 'bitcoin' scheme will be registered and unregistered for testing. 43 'bitcoin' scheme will be registered and unregistered for testing.
43 44
44 PASS window.navigator.isProtocolHandlerRegistered returns 'registered' state. 'b itcoin' is registered successfully. 45 PASS window.navigator.isProtocolHandlerRegistered returns 'registered' state. 'b itcoin' is registered successfully.
45 PASS window.navigator.isProtocolHandlerRegistered returns 'new' state. 'bitcoin' is unregistered successfully. 46 PASS window.navigator.isProtocolHandlerRegistered returns 'new' state. 'bitcoin' is unregistered successfully.
46 47
47 48
48 PASS successfullyParsed is true 49 PASS successfullyParsed is true
49 50
50 TEST COMPLETE 51 TEST COMPLETE
51 52
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698