Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to correctly handle window.location.reload() in a crashtest

80 views
Skip to first unread message

Henrik Skupin

unread,
Nov 14, 2012, 6:17:02 PM11/14/12
to
Hi,

A crashtest for WebRTC requires to reload the current page. So that can
be done by window.location.reload(). Sadly this will cause an infinite
loop when run in the automation. So which practice do we have to set a
flag once the window has been reloaded once? Are there any guides how to
do it?

One option which comes into my mind is to set a cookie. But I wonder if
there are better solutions.

Thanks

--
Henrik

Kyle Huey

unread,
Nov 14, 2012, 6:26:57 PM11/14/12
to Henrik Skupin, dev-pl...@lists.mozilla.org
On Wed, Nov 14, 2012 at 3:17 PM, Henrik Skupin <hsk...@gmail.com> wrote:

> Hi,
>
> A crashtest for WebRTC requires to reload the current page. So that can
> be done by window.location.reload(). Sadly this will cause an infinite
> loop when run in the automation. So which practice do we have to set a
> flag once the window has been reloaded once? Are there any guides how to
> do it?
>

Can you use an iframe?

- Kyle

Kevin Gadd

unread,
Nov 14, 2012, 6:37:01 PM11/14/12
to Kyle Huey, dev-pl...@lists.mozilla.org, Henrik Skupin
Increment a value in localStorage?

-kg

On Wed, Nov 14, 2012 at 3:26 PM, Kyle Huey <m...@kylehuey.com> wrote:

> On Wed, Nov 14, 2012 at 3:17 PM, Henrik Skupin <hsk...@gmail.com> wrote:
>
> > Hi,
> >
> > A crashtest for WebRTC requires to reload the current page. So that can
> > be done by window.location.reload(). Sadly this will cause an infinite
> > loop when run in the automation. So which practice do we have to set a
> > flag once the window has been reloaded once? Are there any guides how to
> > do it?
> >
>
> Can you use an iframe?
>
> - Kyle
> _______________________________________________
> dev-platform mailing list
> dev-pl...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
>



--
-kg

Henrik Skupin

unread,
Nov 15, 2012, 5:31:04 AM11/15/12
to Kyle Huey, dev-pl...@lists.mozilla.org
Kyle Huey wrote on 11/15/12 12:26 AM:

> Can you use an iframe?

I tried and it would work if we wouldn't crash in another area. So using
an iframe is certainly another crashtest. But thanks for the information!

--
Henrik

Henrik Skupin

unread,
Nov 15, 2012, 5:31:04 AM11/15/12
to Kyle Huey, dev-pl...@lists.mozilla.org
Kyle Huey wrote on 11/15/12 12:26 AM:

> Can you use an iframe?

Henrik Skupin

unread,
Nov 15, 2012, 2:04:41 PM11/15/12
to Kevin Gadd, Kyle Huey, dev-pl...@lists.mozilla.org
Kevin Gadd wrote on 11/15/12 12:37 AM:
> Increment a value in localStorage?

That's what I have used now and which works great. Thanks Kevin!

--
Henrik

Henrik Skupin

unread,
Nov 15, 2012, 2:04:41 PM11/15/12
to Kevin Gadd, Kyle Huey, dev-pl...@lists.mozilla.org
Kevin Gadd wrote on 11/15/12 12:37 AM:
> Increment a value in localStorage?

0 new messages