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

Unified Diff: tracing/tracing/ui/base/list_and_associated_view_test.html

Issue 3017523002: Fix uses of /deep/ in trace viewer. (Closed)
Patch Set: fix tests Created 3 years, 3 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
« no previous file with comments | « tracing/tracing/ui/base/list_and_associated_view.html ('k') | tracing/tracing/ui/base/list_view.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « tracing/tracing/ui/base/list_and_associated_view.html ('k') | tracing/tracing/ui/base/list_view.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698