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

Side by Side Diff: tracing/tracing/base/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/bbox2.html ('k') | tracing/tracing/base/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
(Empty)
1 <!DOCTYPE html>
2 <!--
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
5 found in the LICENSE file.
6 -->
7 <link rel="import" href="/tracing/base/bbox2.html">
8 <script>
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
11 // found in the LICENSE file.
12
13 'use strict';
14
15 tr.b.unittest.testSuite(function() {
16 test('addVec2', function() {
17 var bbox = new tr.b.BBox2();
18 var x = vec2.create();
19 vec2.set(x, 10, 10);
20 bbox.addVec2(x);
21 assert.equal(bbox.minVec2[0], 10);
22 assert.equal(bbox.minVec2[1], 10);
23 assert.equal(bbox.maxVec2[0], 10);
24 assert.equal(bbox.maxVec2[1], 10);
25
26 // Mutate x.
27 vec2.set(x, 11, 11);
28
29 // Bbox shouldn't have changed.
30 assert.equal(bbox.minVec2[0], 10);
31 assert.equal(bbox.minVec2[1], 10);
32 assert.equal(bbox.maxVec2[0], 10);
33 assert.equal(bbox.maxVec2[1], 10);
34 });
35 });
36 </script>
OLDNEW
« no previous file with comments | « tracing/tracing/base/bbox2.html ('k') | tracing/tracing/base/math.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698