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

Unified Diff: chrome/test/data/extensions/platform_apps/web_view/geolocation/geolocation_access_iframe.html

Issue 13712002: Fix Guest geolocation API, we were using |bridge_id| and |request_id| interchangeably which is wron… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync. Created 7 years, 8 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
Index: chrome/test/data/extensions/platform_apps/web_view/geolocation/geolocation_access_iframe.html
diff --git a/chrome/test/data/extensions/platform_apps/web_view/geolocation/geolocation_access_iframe.html b/chrome/test/data/extensions/platform_apps/web_view/geolocation/geolocation_access_iframe.html
new file mode 100644
index 0000000000000000000000000000000000000000..a46f7f3fbd392a1f1a589ee215506b8834ec4ca4
--- /dev/null
+++ b/chrome/test/data/extensions/platform_apps/web_view/geolocation/geolocation_access_iframe.html
@@ -0,0 +1,38 @@
+<!--
+ * Copyright 2013 The Chromium Authors. All rights reserved. Use of this
+ * source code is governed by a BSD-style license that can be found in the
+ * LICENSE file.
+-->
+<html>
+ <head>
+ <script type="text/javascript">
+ var onGeolocationSuccess = function(position) {
+ console.log('iframe.onGeolocationSuccess');
+ window.top['onIframeGeolocationSuccess'](position);
+ };
+ var onGeolocationFailure = function(err) {
+ console.log('iframe.onGeolocationFailure');
+ window.top['onIframeGeolocationFailure']();
+ };
+ var startTest = function() {
+ console.log('iframe.startTest');
+ // Ask for a cached geolocation, we already should have fetched
+ // fresh geolocation for the top level frame (guest). Asking for fresh
+ // location from <iframe> again makes Geolocation flaky and sad (b/c of
+ // ui_test_utils::OverrideGeolocation()).
+ navigator.geolocation.getCurrentPosition(
+ onGeolocationSuccess,
+ onGeolocationFailure,
+ // maximumAge > test timeout.
+ {maximumAge: 100000, timeout: 0});
+ };
+ </script>
+ </head>
+ <body bgcolor="red">
+ <div>An &lt;iframe&gt; that requests geolocation.</div>
+ <script>
+ console.log('<iframe> loaded');
+ startTest();
+ </script>
+ </body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698