Now the question is how could we handle such a case:
Step1: Call navigator.vibrate(1234) on main frame ==> Need to confirm the mock impl has actually started vibration.
Step2: Navigate main frame to another arbitrary URL ==> Need to confirm the mock impl will cancel vibration started by step1.
We can do confirmation on step1, but have no idea how to do that for step2,
because main frame navigation will destroy the javascript environment of current page then we can't monitor the result..
Are there any global places where we can put the result which we can still check even after page navigation? Thanks!
--
You received this message because you are subscribed to the Google Groups "chromium-mojo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-mojo+unsubscribe@chromium.org.
To post to this group, send email to chromi...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-mojo/CAH%3DT95SDvw0j-g1iikO_DKTMdTTQKpd1G_XvRLeUFJJc5B%3D62A%40mail.gmail.com.
Does it have to be the main frame? Could you instead navigate a subframe?On Tue, Mar 14, 2017 at 12:38 PM, Joe Mason <joenot...@chromium.org> wrote:A shared worker?On Mar 13, 2017 10:58 PM, "Leon" <leon...@intel.com> wrote:Hi,I'm working on this CL to create some layout tests for VibrationManager mojo interface, and normal test cases are OK, 'navigator.vibrate()' can trigger running mock impl of VibrationManager well.Now the question is how could we handle such a case:Step1: Call navigator.vibrate(1234) on main frame ==> Need to confirm the mock impl has actually started vibration.Step2: Navigate main frame to another arbitrary URL ==> Need to confirm the mock impl will cancel vibration started by step1.We can do confirmation on step1, but have no idea how to do that for step2,because main frame navigation will destroy the javascript environment of current page then we can't monitor the result..Are there any global places where we can put the result which we can still check even after page navigation? Thanks!
--
You received this message because you are subscribed to the Google Groups "chromium-mojo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-moj...@chromium.org.
To post to this group, send email to chromi...@chromium.org.
Does it have to be the main frame? Could you instead navigate a subframe?
On Tue, Mar 14, 2017 at 12:38 PM, Joe Mason <joenot...@chromium.org> wrote:
A shared worker?On Mar 13, 2017 10:58 PM, "Leon" <leon...@intel.com> wrote:Hi,I'm working on this CL to create some layout tests for VibrationManager mojo interface, and normal test cases are OK, 'navigator.vibrate()' can trigger running mock impl of VibrationManager well.Now the question is how could we handle such a case:Step1: Call navigator.vibrate(1234) on main frame ==> Need to confirm the mock impl has actually started vibration.Step2: Navigate main frame to another arbitrary URL ==> Need to confirm the mock impl will cancel vibration started by step1.We can do confirmation on step1, but have no idea how to do that for step2,because main frame navigation will destroy the javascript environment of current page then we can't monitor the result..Are there any global places where we can put the result which we can still check even after page navigation? Thanks!
--
You received this message because you are subscribed to the Google Groups "chromium-mojo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-moj...@chromium.org.
To post to this group, send email to chromi...@chromium.org.
Is the mock globally installed? If so, maybe the test could run in a pop-up window?
Daniel
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-mojo/c1a650ab-db14-4480-9d13-6bd1349040ce%40chromium.org.