Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / trace-viewer / trace_viewer / tracing / trace_model / async_slice_group_test.html
index 22b9acb..9cbb734 100644 (file)
@@ -19,7 +19,8 @@ tvcm.unittest.testSuite(function() { // @suppress longLineCheck
   var newAsyncSlice = tracing.test_utils.newAsyncSlice;
 
   test('asyncSliceGroupBounds_Empty', function() {
-    var g = new AsyncSliceGroup();
+    var thread = {};
+    var g = new AsyncSliceGroup(thread);
     g.updateBounds();
     assertTrue(g.bounds.isEmpty);
   });
@@ -28,7 +29,7 @@ tvcm.unittest.testSuite(function() { // @suppress longLineCheck
     var model = new tracing.TraceModel();
     var p1 = new Process(model, 1);
     var t1 = new Thread(p1, 1);
-    var g = new AsyncSliceGroup();
+    var g = new AsyncSliceGroup(t1);
     g.push(newAsyncSlice(0, 1, t1, t1));
     g.push(newAsyncSlice(1, 1.5, t1, t1));
     assertEquals(2, g.length);
@@ -36,50 +37,6 @@ tvcm.unittest.testSuite(function() { // @suppress longLineCheck
     assertEquals(0, g.bounds.min);
     assertEquals(2.5, g.bounds.max);
   });
-
-  test('asyncSlice_toJSON', function() {
-    var js = [
-      '{',
-      '  "guid_" : __S_GUID__,',
-      '  "selectionState": 0,',
-      '  "start" : 0,',
-      '  "duration" : 1,',
-      '  "category" : "",',
-      '  "title" : "a",',
-      '  "colorId" : 0,',
-      '  "didNotFinish" : false,',
-      '  "startThread" : __T1_GUID__,',
-      '  "endThread" : __T1_GUID__,',
-      '  "subSlices" : [ {',
-      '        "guid_" : __SUB_S_GUID__,',
-      '        "selectionState": 0,',
-      '        "start" : 0,',
-      '        "duration" : 1,',
-      '        "category" : "",',
-      '        "title" : "a",',
-      '        "colorId" : 0,',
-      '        "didNotFinish" : false,',
-      '        "startThread" : __T1_GUID__,',
-      '        "endThread" : __T1_GUID__',
-      '      } ]',
-      '}'].join('\n');
-
-    var model = new tracing.TraceModel();
-    var p1 = new Process(model, 1);
-    var t1 = new Thread(p1, 1);
-    var s = newAsyncSlice(0, 1, t1, t1);
-
-    // Replace placeholders with GUIDs
-    js = js.replace(/__T1_GUID__/g, t1.guid)
-           .replace(/__S_GUID__/g, s.guid)
-           .replace(/__SUB_S_GUID__/g, s.subSlices[0].guid);
-
-    // Modify whitespace of "js" so that string compare with another
-    // JSON.stringified version can succeed.
-    js = JSON.stringify(JSON.parse(js));
-
-    assertEquals(js, JSON.stringify(s));
-  });
 });
 </script>