Commit 6ab44784 authored by Michael Checo's avatar Michael Checo Committed by Commit Bot

Diagnostics: Rename data-point title property to header

Bug: 1125150
Test: browser_tests --gtest_filter=DiagnosticsApp*
Change-Id: I179056a834bfc2704de33c3c84e14b9604788228
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2451590Reviewed-by: default avatarZentaro Kavanagh <zentaro@chromium.org>
Commit-Queue: Michael Checo <michaelcheco@google.com>
Cr-Commit-Position: refs/heads/master@{#814387}
parent c092e474
...@@ -26,26 +26,27 @@ suite('DataPointTest', () => { ...@@ -26,26 +26,27 @@ suite('DataPointTest', () => {
}); });
/** /**
* @param {string} title * @param {string} header
* @param {string} value * @param {string} value
*/ */
function initializeDataPoint(title, value) { function initializeDataPoint(header, value) {
assertFalse(!!dataPointElement); assertFalse(!!dataPointElement);
// Add the data point to the DOM. // Add the data point to the DOM.
dataPointElement = document.createElement('data-point'); dataPointElement = document.createElement('data-point');
assertTrue(!!dataPointElement); assertTrue(!!dataPointElement);
document.body.appendChild(dataPointElement); dataPointElement.header = header;
dataPointElement.title = title;
dataPointElement.value = value; dataPointElement.value = value;
document.body.appendChild(dataPointElement);
return flushTasks(); return flushTasks();
} }
test('InitializeDataPoint', () => { test('InitializeDataPoint', () => {
const title = 'Test title'; const header = 'Test header';
const value = 'Test value'; const value = 'Test value';
return initializeDataPoint(title, value).then(() => { return initializeDataPoint(header, value).then(() => {
assertEquals(title, dataPointElement.$$('.title').textContent.trim()); assertEquals(header, dataPointElement.$$('.header').textContent.trim());
assertEquals(value, dataPointElement.$$('.value').textContent.trim()); assertEquals(value, dataPointElement.$$('.value').textContent.trim());
}); });
}); });
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
justify-content: space-between; justify-content: space-between;
} }
.title { .header {
@apply --diagnostics-data-point-title-font; @apply --diagnostics-data-point-title-font;
color: var(--diagnostics-overview-text-color); color: var(--diagnostics-overview-text-color);
} }
...@@ -16,6 +16,6 @@ ...@@ -16,6 +16,6 @@
} }
</style> </style>
<div class="data-point"> <div class="data-point">
<div class="title">[[title]]</div> <div class="header">[[header]]</div>
<div class="value">[[value]]</div> <div class="value">[[value]]</div>
</div> </div>
\ No newline at end of file
...@@ -10,7 +10,7 @@ import {html, Polymer} from 'chrome://resources/polymer/v3_0/polymer/polymer_bun ...@@ -10,7 +10,7 @@ import {html, Polymer} from 'chrome://resources/polymer/v3_0/polymer/polymer_bun
/** /**
* @fileoverview * @fileoverview
* 'data-point' shows a single piece of information related to a component. It * 'data-point' shows a single piece of information related to a component. It
* consists of a title and description. * consists of a header and value.
*/ */
Polymer({ Polymer({
is: 'data-point', is: 'data-point',
...@@ -18,7 +18,7 @@ Polymer({ ...@@ -18,7 +18,7 @@ Polymer({
_template: html`{__html_template__}`, _template: html`{__html_template__}`,
properties: { properties: {
title: { header: {
type: String, type: String,
// TODO(michaelcheco): Remove when localized strings are added. // TODO(michaelcheco): Remove when localized strings are added.
value: 'Xxxx', value: 'Xxxx',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment