Would be nice if the review-tool offered to show the corresponding header
[WebKit-https.git] / Websites / bugs.webkit.org / code-review-test.html
index 520fd955eecf552b1324d4161668c3d254eb9164..48342c61da8fa95f7403f75bf282aa659b536bc7 100644 (file)
@@ -2,6 +2,7 @@
 <div>FIXME: Run these as part of the layout test suite?</div>
 
 <script>CODE_REVIEW_UNITTEST = true</script>
+<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> 
 <script src="code-review.js"></script>
 <pre id="output"></pre>
 <script>
@@ -75,6 +76,12 @@ function ASSERT_EQUAL(actual, expected) {
         log('FAILED:\ngot:\n' + actual + '\nexpected:\n' + expected + '');
 }
 
+var links = tracLinks('foo/bar/baz.cpp', '');
+ASSERT_EQUAL($(links).attr('href'), 'http://trac.webkit.org/log/trunk/foo/bar/baz.h');
+
+var links = tracLinks('foo/bar.cpp/qux.mm', '');
+ASSERT_EQUAL($(links).attr('href'), 'http://trac.webkit.org/log/trunk/foo/bar.cpp/qux.h');
+
 // Basic setItem.
 var ls = new MockLocalStorage();
 new MockDraftCommentSaver('1234', ls).save();