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

Side by Side Diff: LayoutTests/fast/dom/shadow/compare-treescope-position.html

Issue 20042003: compareDocumentPosition() should report PRECEEDING or FOLLOWING information even if nodes are disco… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add failing test to TestExpectations Created 7 years, 5 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 | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../js/resources/js-test-pre.js"></script> 4 <script src="../../js/resources/js-test-pre.js"></script>
5 <script src="resources/shadow-dom.js"></script> 5 <script src="resources/shadow-dom.js"></script>
6 </head> 6 </head>
7 <body> 7 <body>
8 <div id="console"></div> 8 <div id="console"></div>
9 <div id="sandbox"></div> 9 <div id="sandbox"></div>
10 <script> 10 <script>
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 shouldBe('internals.compareTreeScopePosition(sr3, sr2)', 'Node.DOCUMENT_POSI TION_CONTAINS | Node.DOCUMENT_POSITION_PRECEDING'); 48 shouldBe('internals.compareTreeScopePosition(sr3, sr2)', 'Node.DOCUMENT_POSI TION_CONTAINS | Node.DOCUMENT_POSITION_PRECEDING');
49 49
50 shouldBe('internals.compareTreeScopePosition(sr1, sr3)', 'Node.DOCUMENT_POSI TION_FOLLOWING'); 50 shouldBe('internals.compareTreeScopePosition(sr1, sr3)', 'Node.DOCUMENT_POSI TION_FOLLOWING');
51 shouldBe('internals.compareTreeScopePosition(sr3, sr1)', 'Node.DOCUMENT_POSI TION_PRECEDING'); 51 shouldBe('internals.compareTreeScopePosition(sr3, sr1)', 'Node.DOCUMENT_POSI TION_PRECEDING');
52 52
53 shouldBe('internals.compareTreeScopePosition(document, document)', '0'); 53 shouldBe('internals.compareTreeScopePosition(document, document)', '0');
54 shouldBe('internals.compareTreeScopePosition(sr1, sr1)', '0'); 54 shouldBe('internals.compareTreeScopePosition(sr1, sr1)', '0');
55 55
56 getNodeInShadowTreeStack('a3/c1').removeChild(getNodeInShadowTreeStack('a3/c 2')); 56 getNodeInShadowTreeStack('a3/c1').removeChild(getNodeInShadowTreeStack('a3/c 2'));
57 57
58 shouldBe('internals.compareTreeScopePosition(sr3, sr2)', 'Node.DOCUMENT_POSI TION_DISCONNECTED | Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC'); 58 shouldBeNonZero('internals.compareTreeScopePosition(sr3, sr2) & Node.DOCUMEN T_POSITION_PRECEDING || internals.compareTreeScopePosition(sr3, sr2) & Node.DOCU MENT_POSITION_FOLLOWING');
59 shouldBe('internals.compareTreeScopePosition(sr3, sr2) & Node.DOCUMENT_POSIT ION_DISCONNECTED', 'Node.DOCUMENT_POSITION_DISCONNECTED');
60 shouldBe('internals.compareTreeScopePosition(sr3, sr2) & Node.DOCUMENT_POSIT ION_IMPLEMENTATION_SPECIFIC', 'Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC');
61 shouldBe('internals.compareTreeScopePosition(sr3, sr2)', 'internals.compareT reeScopePosition(sr3, sr2)');
59 } 62 }
60 63
61 testCompareTreeScopePosition(); 64 testCompareTreeScopePosition();
62 </script> 65 </script>
63 <script src="../../js/resources/js-test-post.js"></script> 66 <script src="../../js/resources/js-test-post.js"></script>
64 </body> 67 </body>
65 </html> 68 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698