Commit 8f81b0f4 authored by steveblock@google.com's avatar steveblock@google.com

2010-06-04 Steve Block <steveblock@google.com>

        Reviewed by Jeremy Orlow.

        Geolocation needs more LayoutTests to test making callbacks to remote frames
        https://bugs.webkit.org/show_bug.cgi?id=40146

        This test is similar to callback-to-remote-context.html in that it test making a callback
        from a Geolocation object to a remote frame. In callback-to-remote-context.html, the call
        chain to the Geolocation method is started from the owning frame. In this test, however,
        the call chain is started from the remote frame.

        * fast/dom/Geolocation/callback-to-remote-context2-expected.txt: Added.
        * fast/dom/Geolocation/callback-to-remote-context2.html: Added.
        * fast/dom/Geolocation/script-tests/callback-to-remote-context2.js: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@60669 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 65d65358
2010-06-04 Steve Block <steveblock@google.com>
Reviewed by Jeremy Orlow.
Geolocation needs more LayoutTests to test making callbacks to remote frames
https://bugs.webkit.org/show_bug.cgi?id=40146
This test is similar to callback-to-remote-context.html in that it test making a callback
from a Geolocation object to a remote frame. In callback-to-remote-context.html, the call
chain to the Geolocation method is started from the owning frame. In this test, however,
the call chain is started from the remote frame.
* fast/dom/Geolocation/callback-to-remote-context2-expected.txt: Added.
* fast/dom/Geolocation/callback-to-remote-context2.html: Added.
* fast/dom/Geolocation/script-tests/callback-to-remote-context2.js: Added.
2010-06-04 Steve Block <steveblock@google.com>
Reviewed by Jeremy Orlow.
......
Tests that when a Geolocation request is made from a remote frame, and the JavaScript call chain starts from that remote frame, callbacks are made as usual.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS Success callback invoked
PASS successfullyParsed is true
TEST COMPLETE
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<link rel="stylesheet" href="../../js/resources/js-test-style.css">
<script src="../../js/resources/js-test-pre.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<script src="script-tests/callback-to-remote-context2.js"></script>
<script src="../../js/resources/js-test-post.js"></script>
</body>
</html>
description("Tests that when a Geolocation request is made from a remote frame, and the JavaScript call chain starts from that remote frame, callbacks are made as usual.");
function onIframeReady() {
// Make request from remote frame, with call chain starting here
window.setTimeout(function() {
iframe.contentWindow.navigator.geolocation.getCurrentPosition(function() {
testPassed('Success callback invoked');
finishJSTest();
}, function() {
testFailed('Error callback invoked unexpectedly');
finishJSTest();
});
}, 0);
}
var iframe = document.createElement('iframe');
iframe.src = 'resources/callback-to-remote-context-inner.html';
document.body.appendChild(iframe);
window.jsTestIsAsync = true;
window.successfullyParsed = true;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment