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

Unified Diff: tracing/tracing/model/attribute_test.html

Issue 1744563002: [memory-infra] Move 'infos' field from Attribute to MemoryAllocatorDump (Closed) Base URL: git@github.com:catapult-project/catapult.git@master
Patch Set: Address Primiano's comment Created 4 years, 10 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/model/attribute.html ('k') | tracing/tracing/model/global_memory_dump.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/model/attribute_test.html
diff --git a/tracing/tracing/model/attribute_test.html b/tracing/tracing/model/attribute_test.html
index fb781bf537608c80cb96b9a0ce34da69edc65937..c41a2297d7c5bf0ca6d9fdf559f91279fc734275 100644
--- a/tracing/tracing/model/attribute_test.html
+++ b/tracing/tracing/model/attribute_test.html
@@ -206,26 +206,6 @@ tr.b.unittest.testSuite(function() {
assert.instanceOf(mergedAttr, ScalarAttribute);
});
- test('scalar_clone', function() {
- var originalAttr = new ScalarAttribute('bytes', 1024);
- originalAttr.infos.push({format: 'arbitrary'});
-
- var clonedAttrWithoutInfos = originalAttr.cloneWithoutInfos();
- assert.equal(clonedAttrWithoutInfos.value, 1024);
- assert.equal(clonedAttrWithoutInfos.units, 'bytes');
- assert.instanceOf(clonedAttrWithoutInfos, ScalarAttribute);
- assert.lengthOf(clonedAttrWithoutInfos.infos, 0);
- assert.notStrictEqual(clonedAttrWithoutInfos.infos, originalAttr.infos);
-
- var clonedAttrWithInfos = originalAttr.cloneWithInfos();
- assert.strictEqual(clonedAttrWithInfos.value, 1024);
- assert.strictEqual(clonedAttrWithInfos.units, 'bytes');
- assert.instanceOf(clonedAttrWithInfos, ScalarAttribute);
- assert.lengthOf(clonedAttrWithInfos.infos, 1);
- assert.deepEqual(clonedAttrWithInfos.infos, originalAttr.infos);
- assert.notStrictEqual(clonedAttrWithInfos.infos, originalAttr.infos);
- });
-
test('string_construct', function() {
var attr = new StringAttribute('C', 'absolute zero');
assert.equal(attr.value, 'absolute zero');
@@ -244,27 +224,6 @@ tr.b.unittest.testSuite(function() {
assert.instanceOf(attr, StringAttribute);
});
- test('string_clone', function() {
- var originalAttr = new StringAttribute('m/s', 'speed of sound');
- originalAttr.infos.push({type: 'first info', key: 'first value'});
- originalAttr.infos.push({type: 'last info', key: 'last value'});
-
- var clonedAttrWithoutInfos = originalAttr.cloneWithoutInfos();
- assert.equal(clonedAttrWithoutInfos.value, 'speed of sound');
- assert.equal(clonedAttrWithoutInfos.units, 'm/s');
- assert.instanceOf(clonedAttrWithoutInfos, StringAttribute);
- assert.lengthOf(clonedAttrWithoutInfos.infos, 0);
- assert.notStrictEqual(clonedAttrWithoutInfos.infos, originalAttr.infos);
-
- var clonedAttrWithInfos = originalAttr.cloneWithInfos();
- assert.strictEqual(clonedAttrWithInfos.value, 'speed of sound');
- assert.strictEqual(clonedAttrWithInfos.units, 'm/s');
- assert.instanceOf(clonedAttrWithInfos, StringAttribute);
- assert.lengthOf(clonedAttrWithInfos.infos, 2);
- assert.deepEqual(clonedAttrWithInfos.infos, originalAttr.infos);
- assert.notStrictEqual(clonedAttrWithInfos.infos, originalAttr.infos);
- });
-
test('unknown_construct', function() {
var attr = new UnknownAttribute('ml');
assert.equal(attr.units, 'ml');
@@ -283,25 +242,5 @@ tr.b.unittest.testSuite(function() {
assert.isUndefined(attr.units);
assert.instanceOf(attr, UnknownAttribute);
});
-
- test('unknown_clone', function() {
- var originalAttr = new UnknownAttribute('kcal', '10% RDA');
- originalAttr.infos.push({type: 'some info', key: 'some value'});
-
- var clonedAttrWithoutInfos = originalAttr.cloneWithoutInfos();
- assert.equal(clonedAttrWithoutInfos.value, '10% RDA');
- assert.equal(clonedAttrWithoutInfos.units, 'kcal');
- assert.instanceOf(clonedAttrWithoutInfos, UnknownAttribute);
- assert.lengthOf(clonedAttrWithoutInfos.infos, 0);
- assert.notStrictEqual(clonedAttrWithoutInfos.infos, originalAttr.infos);
-
- var clonedAttrWithInfos = originalAttr.cloneWithInfos();
- assert.strictEqual(clonedAttrWithInfos.value, '10% RDA');
- assert.strictEqual(clonedAttrWithInfos.units, 'kcal');
- assert.instanceOf(clonedAttrWithInfos, UnknownAttribute);
- assert.lengthOf(clonedAttrWithInfos.infos, 1);
- assert.deepEqual(clonedAttrWithInfos.infos, originalAttr.infos);
- assert.notStrictEqual(clonedAttrWithInfos.infos, originalAttr.infos);
- });
});
</script>
« no previous file with comments | « tracing/tracing/model/attribute.html ('k') | tracing/tracing/model/global_memory_dump.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698