diff options
author | bulach@chromium.org <bulach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-24 18:02:41 +0000 |
---|---|---|
committer | bulach@chromium.org <bulach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-24 18:02:41 +0000 |
commit | 5870d5ad4a43fe0e0b8f522a861aab55c97933f6 (patch) | |
tree | d5e17aad913029b07b4fe64c7c67a80acc05e5a3 /chrome/test/data/geolocation/iframes_different_origin.html | |
parent | e561e20e4220751a8eb243ea5da7eb154180c6da (diff) | |
download | chromium_src-5870d5ad4a43fe0e0b8f522a861aab55c97933f6.zip chromium_src-5870d5ad4a43fe0e0b8f522a861aab55c97933f6.tar.gz chromium_src-5870d5ad4a43fe0e0b8f522a861aab55c97933f6.tar.bz2 |
Tentative fix for geolocation test with iframes: loads frame one by one.
Mark as "flaky" to analyze how it behaves, will fully enable it once it's proven stable.
Restructure the tests a bit in order to simplify the usage of mocks.
TEST=geolocation_browsertest.cc
Review URL: http://codereview.chromium.org/1081012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42495 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/data/geolocation/iframes_different_origin.html')
-rwxr-xr-x | chrome/test/data/geolocation/iframes_different_origin.html | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/chrome/test/data/geolocation/iframes_different_origin.html b/chrome/test/data/geolocation/iframes_different_origin.html index a2607f6..076aa64 100755 --- a/chrome/test/data/geolocation/iframes_different_origin.html +++ b/chrome/test/data/geolocation/iframes_different_origin.html @@ -1,22 +1,20 @@ <html>
<script>
-var iframe_id = 0;
-function addIFrame(url) {
- var iframe = document.createElement('iframe');
- iframe.src = url;
- iframe.id = 'iframe_' + (iframe_id++);
- document.body.appendChild(iframe);
-}
-
-function addIFrames() {
- port = location.port;
- path = location.pathname.substring(0, location.pathname.lastIndexOf('/'));
- addIFrame('http://localhost:' + port + path + '/simple.html');
- addIFrame('http://127.0.0.1:' + port + path + '/simple.html');
- return "1";
+var iframe_hosts = ['http://127.0.0.1', 'http://localhost'];
+function addIFrame(iframe_id) { + var port = location.port;
+ var path = location.pathname.substring(0, location.pathname.lastIndexOf('/'));
+ var url = iframe_hosts[iframe_id] + ':' + port + path + '/simple.html';
+ var id = 'iframe_' + iframe_id; + var iframe = document.getElementById(id); + iframe.src = url; + return "" + iframe_id; }
</script>
-<body>
+<body> +<iframe id="iframe_0"></iframe> +<iframe id="iframe_1"></iframe>
Testing Geolocation with iframes.
</body>
</html> + |