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

Unified Diff: tracing/tracing/base/range_test.html

Issue 1300433003: Add range toJSON and fromDict (Closed) Base URL: https://github.com/catapult-project/catapult.git@master
Patch Set: Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tracing/tracing/base/range.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/base/range_test.html
diff --git a/tracing/tracing/base/range_test.html b/tracing/tracing/base/range_test.html
index 6f83ed3293747bd8976798ff05d9b9a2d7ea3dd3..d1bd5f432d89b8b1ba81c00358b1fde8ee42b9ca 100644
--- a/tracing/tracing/base/range_test.html
+++ b/tracing/tracing/base/range_test.html
@@ -36,6 +36,11 @@ tr.b.unittest.testSuite(function() {
r.addRange(r1);
assert.equal(1, r.min);
assert.equal(2, r.max);
+
+ var r2 = Range.fromDict(r.toJSON());
+ assert.equal(r2.isEmpty, r.isEmpty);
+ assert.equal(r2.max, r.max);
+ assert.equal(r2.min, r.min);
});
test('addEmptyRange', function() {
@@ -46,6 +51,11 @@ tr.b.unittest.testSuite(function() {
assert.isTrue(r.isEmpty);
assert.isUndefined(r.min);
assert.isUndefined(r.max);
+
+ var r2 = Range.fromDict(r.toJSON());
+ assert.equal(r2.isEmpty, r.isEmpty);
+ assert.isUndefined(r2.max);
+ assert.isUndefined(r2.min);
});
test('addRangeToRange', function() {
« no previous file with comments | « tracing/tracing/base/range.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698