Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 var embedder = {}; | 5 var embedder = {}; |
| 6 embedder.baseGuestURL = ''; | 6 embedder.baseGuestURL = ''; |
| 7 embedder.guestURL = ''; | 7 embedder.guestURL = ''; |
| 8 embedder.iframeURL = ''; | 8 embedder.iframeURL = ''; |
| 9 | 9 |
| 10 /** @private */ | 10 /** @private */ |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 64 } | 64 } |
| 65 }; | 65 }; |
| 66 window.addEventListener('message', onPostMessageReceived); | 66 window.addEventListener('message', onPostMessageReceived); |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 /** @private */ | 69 /** @private */ |
| 70 embedder.assertCorrectEvent_ = function(e) { | 70 embedder.assertCorrectEvent_ = function(e) { |
| 71 chrome.test.assertEq('geolocation', e.permission); | 71 chrome.test.assertEq('geolocation', e.permission); |
| 72 chrome.test.assertTrue(!!e.url); | 72 chrome.test.assertTrue(!!e.url); |
| 73 chrome.test.assertTrue(e.url.indexOf(embedder.baseGuestURL) == 0); | 73 chrome.test.assertTrue(e.url.indexOf(embedder.baseGuestURL) == 0); |
| 74 | |
|
lazyboy
2014/04/11 21:47:21
Why do you remove these? Do they start getting def
Fady Samuel
2014/04/11 21:57:16
Geolocation recently got a "userGesture". I now pl
lazyboy
2014/04/11 22:00:53
Please add this to the CL description.
Fady Samuel
2014/04/14 17:30:02
Done.
| |
| 75 // Check that unexpected properties (from other permissionrequest) do not show | |
| 76 // up in the event object. | |
| 77 chrome.test.assertFalse('userGesture' in e); | |
| 78 }; | 74 }; |
| 79 | 75 |
| 80 var g_requestObject; | 76 var g_requestObject; |
| 81 | 77 |
| 82 // Tests begin. | 78 // Tests begin. |
| 83 | 79 |
| 84 // Tests CancelGeolocationPermission code path. | 80 // Tests CancelGeolocationPermission code path. |
| 85 function testCancelGeolocationInIFrame() { | 81 function testCancelGeolocationInIFrame() { |
| 86 var webview = embedder.setUpGuest_(); | 82 var webview = embedder.setUpGuest_(); |
| 87 | 83 |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 100 } | 96 } |
| 101 | 97 |
| 102 onload = function() { | 98 onload = function() { |
| 103 chrome.test.getConfig(function(config) { | 99 chrome.test.getConfig(function(config) { |
| 104 embedder.setUp_(config); | 100 embedder.setUp_(config); |
| 105 chrome.test.runTests([ | 101 chrome.test.runTests([ |
| 106 testCancelGeolocationInIFrame, | 102 testCancelGeolocationInIFrame, |
| 107 ]); | 103 ]); |
| 108 }); | 104 }); |
| 109 }; | 105 }; |
| OLD | NEW |