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

Unified Diff: chrome/test/data/webui/md_history/history_card_test.js

Issue 1572383006: MD History: Hook all elements into the page and add tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@patch
Patch Set: Rebase. Created 4 years, 11 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: chrome/test/data/webui/md_history/history_card_test.js
diff --git a/chrome/test/data/webui/md_history/history_card_test.js b/chrome/test/data/webui/md_history/history_card_test.js
new file mode 100644
index 0000000000000000000000000000000000000000..25c5fa4a01159fcd97058215f08e070f88882d82
--- /dev/null
+++ b/chrome/test/data/webui/md_history/history_card_test.js
@@ -0,0 +1,28 @@
+// Copyright 2016 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.
+
+cr.define('md_history.history_card_test', function() {
+ function registerTests() {
+ suite('history-card', function() {
+ test('basic separator insertion', function(done) {
+ var element = document.createElement('history-card');
+ element.historyItems = [
+ {"time": "1000000000"},
+ {"time": "10000000"},
+ {"time": "900000"}
+ ];
+ flush(function() {
+ // Check that the correct number of time gaps are inserted.
+ var spacers =
+ Polymer.dom(element.root).querySelectorAll('#time-gap-separator');
+ assertEquals(2, spacers.length);
+ done();
+ });
+ });
+ });
+ }
+ return {
+ registerTests: registerTests
+ };
+});

Powered by Google App Engine
This is Rietveld 408576698