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

Side by Side Diff: chrome/test/data/webui/cr_elements/cr_scrollable_behavior_tests.js

Issue 2895723002: [WebUI] use one-way Polymer binding on dom-if, dom-repeat, and iron-list (Closed)
Patch Set: Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/resources/pdf/elements/viewer-bookmarks-content/viewer-bookmarks-content.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 suite('cr-scrollable-behavior', function() { 5 suite('cr-scrollable-behavior', function() {
6 /** @type {CrScrollableListElement} */ var testElement; 6 /** @type {CrScrollableListElement} */ var testElement;
7 /** @type {HTMLDivElement} */ var container; 7 /** @type {HTMLDivElement} */ var container;
8 /** @type {IronListElement} */ var ironList; 8 /** @type {IronListElement} */ var ironList;
9 9
10 suiteSetup(function() { 10 suiteSetup(function() {
11 document.body.innerHTML = ` 11 document.body.innerHTML = `
12 <dom-module is="test-element"> 12 <dom-module is="test-element">
13 <template> 13 <template>
14 <style> 14 <style>
15 #container { 15 #container {
16 height: 30px; 16 height: 30px;
17 overflow-y: auto; 17 overflow-y: auto;
18 } 18 }
19 </style> 19 </style>
20 <div id="container" scrollable> 20 <div id="container" scrollable>
21 <iron-list scroll-target="container" items=[[items]]> 21 <iron-list scroll-target="container" items="[[items]]">
dpapad 2017/05/19 19:35:19 Was this caught by a PRESUBMIT? I recall that we a
dschuyler 2017/05/19 19:37:10 It wasn't. I was grepping for issues (just lookin'
22 <template> 22 <template>
23 <div>[[item]]</div> 23 <div>[[item]]</div>
24 </template> 24 </template>
25 </iron-list> 25 </iron-list>
26 </div> 26 </div>
27 </template> 27 </template>
28 </dom-module> 28 </dom-module>
29 `; 29 `;
30 30
31 Polymer({ 31 Polymer({
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 testElement.saveScroll(ironList); 86 testElement.saveScroll(ironList);
87 testElement.items = ['apple', 'bannana', 'cactus', 'cucumber', 'doughnut']; 87 testElement.items = ['apple', 'bannana', 'cactus', 'cucumber', 'doughnut'];
88 testElement.restoreScroll(ironList); 88 testElement.restoreScroll(ironList);
89 Polymer.dom.flush(); 89 Polymer.dom.flush();
90 Polymer.Base.async(function() { 90 Polymer.Base.async(function() {
91 assertEquals(scrollTop, container.scrollTop); 91 assertEquals(scrollTop, container.scrollTop);
92 done(); 92 done();
93 }); 93 });
94 }); 94 });
95 }); 95 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/pdf/elements/viewer-bookmarks-content/viewer-bookmarks-content.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698