| Index: tracing/tracing/ui/base/list_and_associated_view_test.html
|
| diff --git a/tracing/tracing/ui/base/list_and_associated_view_test.html b/tracing/tracing/ui/base/list_and_associated_view_test.html
|
| deleted file mode 100644
|
| index e284832adfdb848fa9b73ce468a3fe8ab27b9328..0000000000000000000000000000000000000000
|
| --- a/tracing/tracing/ui/base/list_and_associated_view_test.html
|
| +++ /dev/null
|
| @@ -1,98 +0,0 @@
|
| -<!DOCTYPE html>
|
| -<!--
|
| -Copyright (c) 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="/tracing/ui/base/list_and_associated_view.html">
|
| -<script>
|
| -'use strict';
|
| -
|
| -tr.b.unittest.testSuite(function() {
|
| - const ListAndAssociatedView = tr.ui.b.ListAndAssociatedView;
|
| -
|
| - const SimpleView = tr.ui.b.define('div');
|
| - SimpleView.prototype = {
|
| - __proto__: HTMLDivElement.prototype,
|
| -
|
| - decorate() {
|
| - this.item_ = undefined;
|
| - },
|
| -
|
| - set item(item) {
|
| - this.item_ = item;
|
| - },
|
| - get item() {
|
| - return this.item_;
|
| - }
|
| - };
|
| -
|
| - test('listViewNamingWithField', function() {
|
| - const lav = new ListAndAssociatedView();
|
| - const list = [
|
| - {x: '1'},
|
| - {x: '2'},
|
| - {x: '3'}
|
| - ];
|
| - const view = new SimpleView();
|
| -
|
| - lav.list = list;
|
| - lav.listProperty = 'x';
|
| - lav.view = view;
|
| - lav.viewProperty = 'item';
|
| -
|
| - const lavListView = lav.listView;
|
| - assert.strictEqual(lavListView.children.length, 3);
|
| - assert.strictEqual(Polymer.dom(lavListView.children[0]).textContent, '1');
|
| - });
|
| -
|
| - test('listViewNamingWithProperty', function() {
|
| - const lav = new ListAndAssociatedView();
|
| -
|
| - function X(x) {
|
| - this.x = x;
|
| - }
|
| - X.prototype = {
|
| - get title() {
|
| - return this.x;
|
| - }
|
| - };
|
| -
|
| - const list = [
|
| - new X('1'),
|
| - new X('2'),
|
| - new X('3')
|
| - ];
|
| - const view = new SimpleView();
|
| -
|
| - lav.list = list;
|
| - lav.listProperty = 'title';
|
| - lav.view = view;
|
| - lav.viewProperty = 'item';
|
| -
|
| - const lavListView = lav.listView;
|
| - assert.strictEqual(lavListView.children.length, 3);
|
| - assert.strictEqual(Polymer.dom(lavListView.children[0]).textContent, '1');
|
| - });
|
| -
|
| - test('selectionChangesView', function() {
|
| - const lav = new ListAndAssociatedView();
|
| - const list = [
|
| - {x: '1'},
|
| - {x: '2'},
|
| - {x: '3'}
|
| - ];
|
| - const view = new SimpleView();
|
| -
|
| - lav.list = list;
|
| - lav.listProperty = 'x';
|
| - lav.view = view;
|
| - lav.viewProperty = 'item';
|
| - const lavListView = lav.listView;
|
| -
|
| - assert.strictEqual(list[0], view.item);
|
| - lavListView.children[1].selected = true;
|
| - assert.strictEqual(list[1], view.item);
|
| - });
|
| -});
|
| -</script>
|
|
|