mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Bug 873864 - Test failures when reloading test_bug669671.html. r=jlebar
This commit is contained in:
parent
b505bca21b
commit
3bee00b4eb
@ -1,8 +1,9 @@
|
||||
function handleRequest(request, response)
|
||||
{
|
||||
var count = parseInt(getState('count'));
|
||||
if (!count)
|
||||
if (!count || request.queryString == 'countreset')
|
||||
count = 0;
|
||||
|
||||
setState('count', count + 1 + '');
|
||||
|
||||
response.setHeader('Content-Type', 'text/html', false);
|
||||
|
@ -66,6 +66,12 @@ function checkPopupLoadCount()
|
||||
|
||||
function test()
|
||||
{
|
||||
// Step 0 - Make sure the count is reset to 0 in case of reload
|
||||
popup.location = 'file_bug669671.sjs?countreset';
|
||||
yield;
|
||||
is(popup.document.body.innerHTML, '0',
|
||||
'Load count should be reset to 0');
|
||||
|
||||
// Step 1 - The popup's body counts how many times we've requested the
|
||||
// resource. This is the first time we've requested it, so it should be '0'.
|
||||
checkPopupLoadCount();
|
||||
|
Loading…
Reference in New Issue
Block a user