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

Side by Side Diff: LayoutTests/fast/dom/navigatorcontentutils/register-protocol-handler.html

Issue 323493003: Scheme of content utils should be compared in an ASCII case-insensitive manner (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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
« no previous file with comments | « no previous file | LayoutTests/fast/dom/navigatorcontentutils/register-protocol-handler-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../../resources/js-test.js"></script> 3 <script src="../../../resources/js-test.js"></script>
4 </head> 4 </head>
5 <body> 5 <body>
6 <p>This test makes sure that navigator.registerProtocolHandler throws the proper exceptions and has no-op default implementation.</p> 6 <p>This test makes sure that navigator.registerProtocolHandler throws the proper exceptions and has no-op default implementation.</p>
7 <pre id="console"></pre> 7 <pre id="console"></pre>
8 <script> 8 <script>
9 if (window.testRunner) 9 if (window.testRunner)
10 testRunner.dumpAsText(); 10 testRunner.dumpAsText();
(...skipping 16 matching lines...) Expand all
27 succeeded = 'SecurityError' == e.name; 27 succeeded = 'SecurityError' == e.name;
28 errorMessage = e.message; 28 errorMessage = e.message;
29 } 29 }
30 30
31 if (succeeded) { 31 if (succeeded) {
32 debug('PASS Invalid protocol "' + protocol + '" threw SecurityError exce ption: "' + errorMessage + '".'); 32 debug('PASS Invalid protocol "' + protocol + '" threw SecurityError exce ption: "' + errorMessage + '".');
33 }else 33 }else
34 debug('FAIL Invalid protocol "' + protocol + '" allowed.'); 34 debug('FAIL Invalid protocol "' + protocol + '" allowed.');
35 }); 35 });
36 36
37 var valid_protocols = ['bitcoin', 'geo', 'im', 'irc', 'ircs', 'magnet', 'mailto' , 'mms', 'news', 'nntp', 'sip', 'sms', 'smsto', 'ssh', 'tel', 'urn', 'webcal', ' wtai', 'xmpp']; 37 var valid_protocols = ['bitcoin', 'BitcoIn', 'geo', 'im', 'irc', 'Irc', 'ircs', 'magnet', 'MagneT', 'mailto', 'mms', 'news', 'nntp', 'sip', 'sms', 'smsto', 'Sms To', 'ssh', 'tel', 'urn', 'webcal', 'WebCAL', 'wtai', 'WTAI', 'xmpp'];
38 valid_protocols.forEach(function (protocol) { 38 valid_protocols.forEach(function (protocol) {
39 var succeeded = false; 39 var succeeded = false;
40 try { 40 try {
41 window.navigator.registerProtocolHandler(protocol, "valid protocol %s", "title"); 41 window.navigator.registerProtocolHandler(protocol, "valid protocol %s", "title");
42 succeeded = true; 42 succeeded = true;
43 } catch (e) { 43 } catch (e) {
44 succeeded = false; 44 succeeded = false;
45 } 45 }
46 46
47 if (succeeded) 47 if (succeeded)
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 else if (state == "declined") 110 else if (state == "declined")
111 debug("FAIL window.navigator.isProtocolHandlerRegistered returns 'declin ed' state. Fail to register 'bitcoin' protocol"); 111 debug("FAIL window.navigator.isProtocolHandlerRegistered returns 'declin ed' state. Fail to register 'bitcoin' protocol");
112 } catch (e) { 112 } catch (e) {
113 debug('FAIL window.navigator.isProtocolHandlerRegistered call is failed: "' + e.message + '".'); 113 debug('FAIL window.navigator.isProtocolHandlerRegistered call is failed: "' + e.message + '".');
114 } 114 }
115 debug("\n"); 115 debug("\n");
116 116
117 </script> 117 </script>
118 </body> 118 </body>
119 </html> 119 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/navigatorcontentutils/register-protocol-handler-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698