Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / innerHTML / javascript-url.html
blobed1e30a1783076879adc6073c7fc12554dc8d3d3
1 <!DOCTYPE html>
2 <script src="../../resources/js-test.js"></script>
3 <body>
4 Test that innerHTML/outerHTML does not mangle javascript: urls.
5 <div id=console></div>
6 <div id=jsurltest><a href='javascript:test(&37;3C!--D--&37;3E)'>link</a></div>
7 <script>
8 var r = document.getElementById('jsurltest');
10 r.innerHTML = r.innerHTML.replace('&amp;37;3C!--D--&amp;37;3E', 123);
11 shouldBeEqualToString('r.innerHTML', '<a href="javascript:test(123)">link</a>');
13 r.firstChild.setAttribute('href', 'javascript:test(\"text<\")');
14 shouldBeEqualToString('r.innerHTML', '<a href=\'javascript:test("text<")\'>link</a>');
16 r.firstChild.setAttribute('href', 'javascript:test(\'text>\')');
17 shouldBeEqualToString("r.innerHTML", '<a href="javascript:test(\'text>\')">link</a>');
19 testString = 'javascript:test(\'text&\',"test2&")';
20 r.firstChild.setAttribute('href', testString);
21 shouldBeEqualToString('r.innerHTML', '<a href="javascript:test(\'text&amp;\',&quot;test2&amp;&quot;)">link</a>');
23 r.firstChild.href = 'javascript:window.location=\'?x&y\'';
24 shouldBeEqualToString("r.firstChild.outerHTML", '<a href="javascript:window.location=\'?x&amp;y\'">link</a>');
26 // Behavior is same as FF
27 r.firstChild.href = 'javascript:window.location=\'?x&amp;y\'';
28 shouldBeEqualToString('r.firstChild.outerHTML', '<a href="javascript:window.location=\'?x&amp;amp;y\'">link</a>');
29 r.innerHTML = '<a href="javascript:window.location=\'?x&amp;y\'">link</a>';
30 shouldBeEqualToString('r.firstChild.outerHTML', '<a href="javascript:window.location=\'?x&amp;y\'">link</a>');
31 </script>