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

Side by Side Diff: tracing/tracing/ui/base/resize_sensor_test.html

Issue 1923953003: [polymer] Switches .appendChild() to Polymer.dom()...appendChild() (Closed) Base URL: git@github.com:catapult-project/catapult.git@polymer10-migration
Patch Set: Created 4 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <!-- 2 <!--
3 Copyright (c) 2015 The Chromium Authors. All rights reserved. 3 Copyright (c) 2015 The Chromium Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style license that can be 4 Use of this source code is governed by a BSD-style license that can be
5 found in the LICENSE file. 5 found in the LICENSE file.
6 --> 6 -->
7 7
8 <link rel="import" href="/tracing/base/task.html"> 8 <link rel="import" href="/tracing/base/task.html">
9 <link rel="import" href="/tracing/ui/base/resize_sensor.html"> 9 <link rel="import" href="/tracing/ui/base/resize_sensor.html">
10 10
11 <script> 11 <script>
12 'use strict'; 12 'use strict';
13 13
14 tr.b.unittest.testSuite(function() { 14 tr.b.unittest.testSuite(function() {
15 function forceLayout(element) { 15 function forceLayout(element) {
16 element.offsetHeight; 16 element.offsetHeight;
17 } 17 }
18 18
19 test('instantiate', function() { 19 test('instantiate', function() {
20 var sensor = document.createElement('tr-ui-b-resize-sensor'); 20 var sensor = document.createElement('tr-ui-b-resize-sensor');
21 sensor.appendChild(document.createTextNode('hello')); 21 Polymer.dom(sensor).appendChild(document.createTextNode('hello'));
22 22
23 var resizeCount = 0; 23 var resizeCount = 0;
24 function onResize(event) { 24 function onResize(event) {
25 resizeCount += 1; 25 resizeCount += 1;
26 } 26 }
27 27
28 this.addHTMLOutput(sensor); 28 this.addHTMLOutput(sensor);
29 forceLayout(sensor); 29 forceLayout(sensor);
30 sensor.addEventListener('resize', onResize); 30 sensor.addEventListener('resize', onResize);
31 31
(...skipping 15 matching lines...) Expand all
47 forceLayout(sensor); 47 forceLayout(sensor);
48 window.requestAnimationFrame(function() { 48 window.requestAnimationFrame(function() {
49 assert.equal(1, resizeCount); 49 assert.equal(1, resizeCount);
50 resolve(); 50 resolve();
51 }); 51 });
52 }); 52 });
53 }); 53 });
54 }); 54 });
55 }); 55 });
56 </script> 56 </script>
OLDNEW
« no previous file with comments | « tracing/tracing/ui/base/radio_picker_test.html ('k') | tracing/tracing/ui/base/tab_view_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698