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

Side by Side Diff: tracing/tracing/base/event_target_test.html

Issue 2769203003: [tracing] Fix import ordering in all files under tracing/ (Closed)
Patch Set: Created 3 years, 9 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 | « no previous file | tracing/tracing/extras/chrome/cc/cc.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <!-- 2 <!--
3 Copyright (c) 2014 The Chromium Authors. All rights reserved. 3 Copyright (c) 2014 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 <link rel="import" href="/tracing/base/event.html">
7 <link rel="import" href="/tracing/base/event_target.html"> 8 <link rel="import" href="/tracing/base/event_target.html">
8 <link rel="import" href="/tracing/base/event.html">
9 <script> 9 <script>
10 'use strict'; 10 'use strict';
11 11
12 tr.b.unittest.testSuite(function() { 12 tr.b.unittest.testSuite(function() {
13 test('eventTargetHelper', function() { 13 test('eventTargetHelper', function() {
14 var listenerCallCount = 0; 14 var listenerCallCount = 0;
15 function listener() { listenerCallCount++; } 15 function listener() { listenerCallCount++; }
16 16
17 var div = new tr.b.EventTarget(); 17 var div = new tr.b.EventTarget();
18 tr.b.EventTargetHelper.decorate(div); 18 tr.b.EventTargetHelper.decorate(div);
19 19
20 assert.isFalse(div.hasEventListener('foo')); 20 assert.isFalse(div.hasEventListener('foo'));
21 21
22 div.addEventListener('foo', listener); 22 div.addEventListener('foo', listener);
23 assert.isTrue(div.hasEventListener('foo')); 23 assert.isTrue(div.hasEventListener('foo'));
24 24
25 tr.b.dispatchSimpleEvent(div, 'foo'); 25 tr.b.dispatchSimpleEvent(div, 'foo');
26 assert.equal(listenerCallCount, 1); 26 assert.equal(listenerCallCount, 1);
27 27
28 div.removeEventListener('foo', listener); 28 div.removeEventListener('foo', listener);
29 29
30 tr.b.dispatchSimpleEvent(div, 'foo'); 30 tr.b.dispatchSimpleEvent(div, 'foo');
31 assert.equal(listenerCallCount, 1); 31 assert.equal(listenerCallCount, 1);
32 32
33 assert.isFalse(div.hasEventListener('foo')); 33 assert.isFalse(div.hasEventListener('foo'));
34 }); 34 });
35 }); 35 });
36 </script> 36 </script>
OLDNEW
« no previous file with comments | « no previous file | tracing/tracing/extras/chrome/cc/cc.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698