def test_OOMAllocationSize_predicate_signature_fragment_3(self): pc = DotDict() pc.signature = 'CrashAtUnhandlableOOM' rc = DotDict() fake_processor = create_basic_fake_processor() rule = OOMSignature() predicate_result = rule.predicate(rc, pc, fake_processor) ok_(predicate_result)
def test_OOMAllocationSize_predicate_signature_fragment_2(self): pc = DotDict() pc.signature = 'mozalloc_handle_oom | this | is | bad' rc = DotDict() fake_processor = create_basic_fake_processor() rule = OOMSignature() predicate_result = rule.predicate(rc, pc, fake_processor) ok_(predicate_result)
def test_OOMAllocationSize_predicate_no_match(self): pc = DotDict() pc.signature = 'hello' rc = DotDict() fake_processor = create_basic_fake_processor() rule = OOMSignature() predicate_result = rule.predicate(rc, pc, fake_processor) ok_(not predicate_result)
def test_OOMAllocationSize_predicate_signature_fragment_1(self): pc = DotDict() pc.signature = 'this | is | a | NS_ABORT_OOM | signature' rc = DotDict() fake_processor = create_basic_fake_processor() rule = OOMSignature() predicate_result = rule.predicate(rc, pc, fake_processor) ok_(predicate_result)
def test_OOMAllocationSize_predicate(self): pc = DotDict() pc.signature = 'hello' rd = {} rc = DotDict() rc.OOMAllocationSize = 17 fake_processor = create_basic_fake_processor() rule = OOMSignature(fake_processor.config) predicate_result = rule.predicate(rc, rd, pc, fake_processor) ok_(predicate_result)