Improved fuzzer. It will now throw in additional refreshes, which is known to mess with lifetime assumptions.
BUG= TEST= Review URL: https://webrtc-codereview.appspot.com/679008 git-svn-id: http://webrtc.googlecode.com/svn/trunk@2492 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
01ad75888a
commit
2eefb2242f
@ -13,9 +13,11 @@
|
||||
<title>WebRTC Fuzz Test Template</title>
|
||||
<script type="text/javascript">
|
||||
function requestVideo() {
|
||||
BEFORE_GET_USER_MEDIA_CALL
|
||||
navigator.webkitGetUserMedia(FUZZ_USER_MEDIA_INPUT,
|
||||
FUZZ_OK_CALLBACK,
|
||||
FUZZ_FAIL_CALLBACK);
|
||||
AFTER_GET_USER_MEDIA_CALL
|
||||
}
|
||||
|
||||
function getUserMediaFailedCallback(error) {
|
||||
|
@ -30,9 +30,9 @@ def RandomIdentifier():
|
||||
for i in xrange(length)))
|
||||
|
||||
|
||||
def GenerateRandomJavascriptAttributes(with_num_attributes):
|
||||
def GenerateRandomJavascriptAttributes(num_attributes):
|
||||
return ['%s: %s' % (RandomIdentifier(), GenerateRandomJavascriptValue())
|
||||
for i in xrange(with_num_attributes)]
|
||||
for i in xrange(num_attributes)]
|
||||
|
||||
|
||||
def MakeJavascriptObject(attributes):
|
||||
@ -88,4 +88,12 @@ def Fuzz(template):
|
||||
if random.random() < 0.5 else 'getUserMediaFailedCallback')
|
||||
template = FillInParameter('FUZZ_FAIL_CALLBACK', fail_callback, template)
|
||||
|
||||
before_call = 'location.reload();' if random.random() < 0.1 else ''
|
||||
template = FillInParameter('BEFORE_GET_USER_MEDIA_CALL', before_call,
|
||||
template)
|
||||
|
||||
after_call = 'location.reload();' if random.random() < 0.3 else ''
|
||||
template = FillInParameter('AFTER_GET_USER_MEDIA_CALL', after_call,
|
||||
template)
|
||||
|
||||
return template
|
||||
|
Loading…
x
Reference in New Issue
Block a user