OLD | NEW |
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script> | 4 <script> |
5 function makeGeolocationRequest() { | 5 function makeGeolocationRequest() { |
6 if (!window.testRunner || !window.internals) | 6 if (!window.testRunner || !window.internals) |
7 debug('This test can not run without testRunner or internals'); | 7 debug('This test can not run without testRunner or internals'); |
8 | 8 |
9 internals.setGeolocationClientMock(document); | 9 var parent = window.parent; |
10 internals.setGeolocationPermission(document, true); | |
11 internals.setGeolocationPosition(document, 51.478, -0.166, 100); | |
12 | 10 |
13 var parent = window.parent; | 11 internals.setGeolocationClientMock(parent.document); |
| 12 internals.setGeolocationPermission(parent.document, true); |
| 13 internals.setGeolocationPosition(parent.document, 51.478, -0.166, 100)
; |
14 | 14 |
15 // Make request from remote frame, this frame will be gone by the time
the Geolocation | 15 // Make request from remote frame, this frame will be gone by the time
the Geolocation |
16 // object attempts to invoke the callback. | 16 // object attempts to invoke the callback. |
17 window.parent.navigator.geolocation.getCurrentPosition(function() { | 17 window.parent.navigator.geolocation.getCurrentPosition(function() { |
18 parent.testPassed('Success callback invoked'); | 18 parent.testPassed('Success callback invoked'); |
19 parent.finishJSTest(); | 19 parent.finishJSTest(); |
20 }, function() { | 20 }, function() { |
21 parent.testFailed('Error callback invoked unexpectedly'); | 21 parent.testFailed('Error callback invoked unexpectedly'); |
22 parent.finishJSTest(); | 22 parent.finishJSTest(); |
23 }); | 23 }); |
24 } | 24 } |
25 </script> | 25 </script> |
26 </head> | 26 </head> |
27 <body onload="window.parent.onFirstIframeLoaded()", onunload="makeGeolocationR
equest()"> | 27 <body onload="window.parent.onFirstIframeLoaded()", onunload="makeGeolocationR
equest()"> |
28 <p>This frame should be replaced before the test ends</p> | 28 <p>This frame should be replaced before the test ends</p> |
29 </body> | 29 </body> |
30 </html> | 30 </html> |
OLD | NEW |