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

Unified Diff: Tools/GardeningServer/ui/test/ct-builder-tests.html

Issue 411763003: Set up mocha, chai and karma for sheriff-o-matic unit testing. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: Tools/GardeningServer/ui/test/ct-builder-tests.html
diff --git a/Tools/GardeningServer/ui/test/ct-builder-tests.html b/Tools/GardeningServer/ui/test/ct-builder-tests.html
new file mode 100644
index 0000000000000000000000000000000000000000..ce108b3a367b90edf0aebeb82e7c588b2e24e32d
--- /dev/null
+++ b/Tools/GardeningServer/ui/test/ct-builder-tests.html
@@ -0,0 +1,47 @@
+<!--
+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-builder.html">
+
+<script>
+(function () {
+
+var expect = chai.expect;
+
+suite('ct-builder', function() {
+ var builder;
+
+ suiteSetup(function(done) {
+ builder = document.createElement('ct-builder');
+ builder.builder = 'WebKit Linux (dbg)';
+ requestAnimationFrame(function() { done(); });
ojan 2014/07/23 01:36:58 Lol. I like that we can say done now instead of st
michaelpg 2014/07/23 02:12:01 If we wanted, we could do it qunit-style by removi
+ });
+
+ suite('basic', function() {
+ test('basic', function() {
+ var a = builder.shadowRoot.querySelector('a');
+ expect(a.href);
esprehn 2014/07/25 23:59:39 This is weird.
michaelpg 2014/07/28 20:35:05 Acknowledged.
+ expect(a.href).include('WebKit+Linux+(dbg)');
+ });
+ });
+
+ suite('steps', function() {
+ setup(function(done) {
+ builder.steps = ['gclient_revert', 'compile', 'unittests'];
+ requestAnimationFrame(function() { done(); });
+ });
+
+ test('basic', function() {
+ var a = builder.shadowRoot.querySelector('a');
+ expect(a).ok;
+ expect(a.href).include('WebKit+Linux+(dbg)');
+ expect(a.innerText).include('gclient_revert, compile, unittests');
+ });
+ });
+});
+
+})()
+</script>

Powered by Google App Engine
This is Rietveld 408576698