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

Unified Diff: dashboard/dashboard/elements/stoppage-alert-debug-button-test.html

Issue 2616153002: Create debug dialog for data stoppage alerts. (Closed)
Patch Set: Addressed review comments Created 3 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: dashboard/dashboard/elements/stoppage-alert-debug-button-test.html
diff --git a/dashboard/dashboard/elements/stoppage-alert-debug-button-test.html b/dashboard/dashboard/elements/stoppage-alert-debug-button-test.html
new file mode 100644
index 0000000000000000000000000000000000000000..e68535dd6bf4cff80e1071e2c45dffd5bc59d8c9
--- /dev/null
+++ b/dashboard/dashboard/elements/stoppage-alert-debug-button-test.html
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<!--
+Copyright 2017 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="/dashboard/elements/stoppage-alert-debug-button.html">
+<link rel="import" href="/dashboard/static/testing_common.html">
+
+<link rel="import" href="/tracing/core/test_utils.html">
+
+<script>
+'use strict';
+
+tr.b.unittest.testSuite(function() {
+
+ var testOptions = {
+ tearDown: function() {
+ testing_common.clearXhrMock();
+ }
+ };
+
+ test('instantiation', function() {
+ var mockResponse = {
+ 'test_path': 'ChromiumPerf/android-nexus-5/sunspider/Total',
+ 'current_commit_pos': '426441',
+ 'next_commit_pos': '426480',
+ 'current_logdog_uri': 'https://luci-logdog.appspot.com/v/?current',
+ 'next_logdog_uri': 'https://luci-logdog.appspot.com/v/?s=next',
+ 'current_buildbot_status_page': 'http://build.chromium.org/p/current',
+ 'next_buildbot_status_page': 'http://build.chromium.org/p/next',
+ 'current_result': [0, []],
+ 'next_result': [1, ['failed', 'blah-blah']]
+ };
+ testing_common.addXhrMock('*', JSON.stringify(mockResponse));
+ var button = document.createElement('stoppage-alert-debug-button');
+ button.alertKey = '12345';
+ // Styles are different inside/outside the rest of the polymer elements.
+ button.$['debug-dialog'].style.position = 'static';
+ button.open();
+ this.addHTMLOutput(button);
+ }, testOptions);
+
+});
+</script>
« no previous file with comments | « dashboard/dashboard/elements/stoppage-alert-debug-button.html ('k') | dashboard/dashboard/services/milo_service.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698