Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Unified Diff: LayoutTests/fast/dom/Geolocation/resources/notimer-after-unload.js

Issue 2128029: Merge 59859 - 20100520 Marcus Bulach <bulach@chromium.org>... (Closed) Base URL: svn://chrome-svn/chrome/branches/WebKit/375/
Patch Set: Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/dom/Geolocation/notimer-after-unload-expected.txt ('k') | WebCore/ChangeLog » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/dom/Geolocation/resources/notimer-after-unload.js
===================================================================
--- LayoutTests/fast/dom/Geolocation/resources/notimer-after-unload.js (revision 0)
+++ LayoutTests/fast/dom/Geolocation/resources/notimer-after-unload.js (revision 48113)
@@ -0,0 +1,21 @@
+description("Tests that no timers will trigger for navigator.geolocation object after onunload.");
+
+if (window.layoutTestController) layoutTestController.setGeolocationPermission(true);
+
+document.body.onload = function() {
+ location = "data:text/html,You should have seen one unload alert appear.<script>window.setTimeout('if (window.layoutTestController) layoutTestController.notifyDone();', 100);</" + "script>";
+}
+
+document.body.onunload = function() {
+ navigator.geolocation.getCurrentPosition(
+ function(p) {alert('FAIL: Unexpected Geolocation success callback.');},
+ function(e) {alert('FAIL: Unexpected Geolocation error callback.' + e.code + e.message);},
+ {timeout: 0, maximumAge:0}
+ );
+ alert("unload-called");
+}
+
+var isAsynchronous = true;
+var successfullyParsed = true;
+
+if (window.layoutTestController) layoutTestController.waitUntilDone();
« no previous file with comments | « LayoutTests/fast/dom/Geolocation/notimer-after-unload-expected.txt ('k') | WebCore/ChangeLog » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698