Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / Range / compareBoundaryPoints-2.html
blob748df020bff16097c18c93e66611322b76dedccb
1 <body>
2 <p>Test compareBoundaryPoints results in a particular case, see
3 <a href="https://bugs.webkit.org/show_bug.cgi?id=20738">bug 20738</a>.</p>
4 <div id='text'>Some text.</div>
5 <hr />
6 <div id='output'></div>
7 <script type="text/javascript">
8 function log(text) {
9 var $out = document.getElementById("output");
10 $out.innerHTML += "<br />" + text;
13 if (window.testRunner)
14 window.testRunner.dumpAsText();
17 var text = document.getElementById("text");
19 sourceRange = document.createRange();
20 sourceRange.selectNode(text);
22 range = document.createRange();
23 range.setStart(text.firstChild, 1);
24 range.setEnd(text.firstChild, 2);
27 log("<ul>" +
28 "<li>START_TO_START = " + range.compareBoundaryPoints(Range.START_TO_START, sourceRange) +
29 "</li><li>START_TO_END = " + range.compareBoundaryPoints(Range.START_TO_END, sourceRange) +
30 "</li><li>END_TO_START = " + range.compareBoundaryPoints(Range.END_TO_START, sourceRange) +
31 "</li><li>END_TO_END = " + range.compareBoundaryPoints(Range.END_TO_END, sourceRange) +
32 "</li></ul>");
34 log((range.compareBoundaryPoints(Range.START_TO_START, sourceRange) == 1
35 && range.compareBoundaryPoints(Range.START_TO_END, sourceRange) == 1
36 && range.compareBoundaryPoints(Range.END_TO_START, sourceRange) == -1
37 && range.compareBoundaryPoints(Range.END_TO_END, sourceRange) == -1) ? "PASS" : "FAIL");
39 </script>
40 </body>