OLD | NEW |
| (Empty) |
1 description('Tests that a cached position can be obtained in one frame after ano
ther frame has received a fresh position.'); | |
2 | |
3 if (!window.testRunner || !window.internals) | |
4 debug('This test can not run without testRunner or internals'); | |
5 | |
6 internals.setGeolocationClientMock(document); | |
7 internals.setGeolocationPosition(document, 51.478, -0.166, 100); | |
8 internals.setGeolocationPermission(document, true); | |
9 | |
10 window.onmessage = function (messageEvent) { | |
11 debug(messageEvent.data.message); | |
12 success = messageEvent.data.success; | |
13 shouldBeTrue('success'); | |
14 finishJSTest(); | |
15 } | |
16 | |
17 navigator.geolocation.getCurrentPosition( | |
18 function() { | |
19 // Kick off the iframe to request a cached position. The iframe | |
20 // will post a message back on success / failure. | |
21 iframe = document.createElement('iframe'); | |
22 iframe.src = 'resources/cached-position-iframe-inner.html'; | |
23 document.body.appendChild(iframe); | |
24 }); | |
25 | |
26 window.jsTestIsAsync = true; | |
OLD | NEW |