tools/mac/power/collapse_profile_test.py
def testNoStackDisappearance(self):
    """Tests that a stack that finishes with an ignored frame isn't culled from
    the report. It represents overhead and should be kept"""

    samples = [{
        'frames': ['foo', 'bar', 'baz', 'base::MessagePumpNSRunLoop::DoRun'],
        'weight':
        24
    }]
    shortened_stack = [{
        'frames': ['base::MessagePumpNSRunLoop::DoRun'],
        'weight': 24
    }]

    stack_collapser = StackCollapser('./samples.collapsed')
    stack_collapser.set_samples_for_testing(samples)
    stack_collapser.post_process_samples()
    self.assertEquals(shortened_stack, stack_collapser.samples)
Tests that a stack that finishes with an ignored frame isn't culled from
    the report. It represents overhead and should be kept
Tests that a stack that finishes with an ignored frame isn't culled from
the report. It represents overhead and should be kept
Tests that a stack that finishes with an ignored frame isn ' t culled from the report . It represents overhead and should be kept
def testNoStackDisappearance(self):
    samples = [{
        'frames': ['foo', 'bar', 'baz', 'base::MessagePumpNSRunLoop::DoRun'],
        'weight':
        24
    }]
    shortened_stack = [{
        'frames': ['base::MessagePumpNSRunLoop::DoRun'],
        'weight': 24
    }]
    stack_collapser = StackCollapser('./samples.collapsed')
    stack_collapser.set_samples_for_testing(samples)
    stack_collapser.post_process_samples()
    self.assertEquals(shortened_stack, stack_collapser.samples)
def testNoStackDisappearance ( self ) : samples = [ { 'frames' : [ 'foo' , 'bar' , 'baz' , 'base::MessagePumpNSRunLoop::DoRun' ] , 'weight' : 24 } ] shortened_stack = [ { 'frames' : [ 'base::MessagePumpNSRunLoop::DoRun' ] , 'weight' : 24 } ] stack_collapser = StackCollapser ( './samples.collapsed' ) stack_collapser . set_samples_for_testing ( samples ) stack_collapser . post_process_samples ( ) self . assertEquals ( shortened_stack , stack_collapser . samples )
Tests that a stack that finishes with an ignored frame isn't culled from
the report.
Tests that a stack that finishes with an ignored frame isn ' t culled from the report .
"""Tests that a stack that finishes with an ignored frame isn't culled from
    the report. It represents overhead and should be kept"""
self