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

Side by Side Diff: tracing/tracing/base/math/bbox2_test.html

Issue 2771723003: [tracing] Move math utilities from base into their own subdirectory (attempt 2) (Closed)
Patch Set: rebase 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 | « tracing/tracing/base/math/bbox2.html ('k') | tracing/tracing/base/math/math.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/bbox2.html"> 7 <link rel="import" href="/tracing/base/math/bbox2.html">
8 <script> 8 <script>
9 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 9 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
10 // Use of this source code is governed by a BSD-style license that can be 10 // Use of this source code is governed by a BSD-style license that can be
11 // found in the LICENSE file. 11 // found in the LICENSE file.
12 12
13 'use strict'; 13 'use strict';
14 14
15 tr.b.unittest.testSuite(function() { 15 tr.b.unittest.testSuite(function() {
16 test('addVec2', function() { 16 test('addVec2', function() {
17 var bbox = new tr.b.BBox2(); 17 var bbox = new tr.b.math.BBox2();
18 var x = vec2.create(); 18 var x = vec2.create();
19 vec2.set(x, 10, 10); 19 vec2.set(x, 10, 10);
20 bbox.addVec2(x); 20 bbox.addVec2(x);
21 assert.equal(bbox.minVec2[0], 10); 21 assert.equal(bbox.minVec2[0], 10);
22 assert.equal(bbox.minVec2[1], 10); 22 assert.equal(bbox.minVec2[1], 10);
23 assert.equal(bbox.maxVec2[0], 10); 23 assert.equal(bbox.maxVec2[0], 10);
24 assert.equal(bbox.maxVec2[1], 10); 24 assert.equal(bbox.maxVec2[1], 10);
25 25
26 // Mutate x. 26 // Mutate x.
27 vec2.set(x, 11, 11); 27 vec2.set(x, 11, 11);
28 28
29 // Bbox shouldn't have changed. 29 // Bbox shouldn't have changed.
30 assert.equal(bbox.minVec2[0], 10); 30 assert.equal(bbox.minVec2[0], 10);
31 assert.equal(bbox.minVec2[1], 10); 31 assert.equal(bbox.minVec2[1], 10);
32 assert.equal(bbox.maxVec2[0], 10); 32 assert.equal(bbox.maxVec2[0], 10);
33 assert.equal(bbox.maxVec2[1], 10); 33 assert.equal(bbox.maxVec2[1], 10);
34 }); 34 });
35 }); 35 });
36 </script> 36 </script>
OLDNEW
« no previous file with comments | « tracing/tracing/base/math/bbox2.html ('k') | tracing/tracing/base/math/math.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698