Index: Tools/GardeningServer/model/ct-commit-tests.html |
diff --git a/Tools/GardeningServer/model/ct-commit-tests.html b/Tools/GardeningServer/model/ct-commit-tests.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..80289cdaa47281eaecf092f1fce6605dde07ea3c |
--- /dev/null |
+++ b/Tools/GardeningServer/model/ct-commit-tests.html |
@@ -0,0 +1,58 @@ |
+<!-- |
+Copyright 2014 The Chromium Authors. All rights reserved. |
+Use of this source code is governed by a BSD-style license that can be |
+found in the LICENSE file. |
+--> |
+ |
+<link rel="import" href="ct-commit.html"> |
+ |
+<script> |
+(function () { |
+ |
+module("ct-commit"); |
+ |
+test("basic", 5, function() { |
+ var message = |
+ "This matches Gecko's behavior for these types of properties.\n" + |
+ "\n" + |
+ "BUG=17325\n" + |
+ "R=jochen@chromium.org\n" + |
+ "CC=abarth@chromium.org\n" + |
+ "\n" + |
+ "Review URL: https://chromiumcodereview.appspot.com/25022002\n" + |
+ "\n" + |
+ "git-svn-id: svn://svn.chromium.org/chrome/trunk@158545 bbb929c8-8fbe-4397-9dbb-9b2b20218538"; |
+ var urlBase = "http://mockbase.com"; |
+ var author = "mkwst@chromium.org"; |
+ |
+ var commit = new CTCommit(author, message, urlBase); |
+ |
+ equal(commit.author, author); |
+ equal(commit.message, message); |
+ equal(commit.revision, 158545); |
+ equal(commit.summary, "This matches Gecko's behavior for these types of properties."); |
+ equal(commit.url, urlBase + "?view=rev&revision=158545"); |
+}); |
+ |
+test("blink", 2, function() { |
+ var message = |
+ "This matches Gecko's behavior for these types of properties.\n" + |
+ "\n" + |
+ "BUG=17325\n" + |
+ "R=jochen@chromium.org\n" + |
+ "CC=abarth@chromium.org\n" + |
+ "\n" + |
+ "Review URL: https://chromiumcodereview.appspot.com/25022002\n" + |
+ "\n" + |
+ "git-svn-id: svn://svn.chromium.org/blink/trunk@158545 bbb929c8-8fbe-4397-9dbb-9b2b20218538"; |
+ var urlBase = "http://mockbase.com"; |
+ var author = "mkwst@chromium.org"; |
+ |
+ var commit = new CTCommit(author, message, urlBase); |
+ |
+ equal(commit.revision, 158545); |
+ equal(commit.url, urlBase + "?view=rev&revision=158545"); |
+}); |
+ |
+})(); |
+</script> |