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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/disconnected-frame-already.js

Issue 2667393002: Stop using script-tests in fast/dom/. (Closed)
Patch Set: . Created 3 years, 10 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 unified diff | Download patch
OLDNEW
(Empty)
1 description("Tests that when a request is made on a Geolocation object after its frame has been disconnected, no callbacks are made and no crash occurs.");
2
3 var iframe = document.createElement('iframe');
4
5 geolocationServiceMock.then(mock => {
6 mock.setGeolocationPermission(true);
7 mock.setGeolocationPosition(51.478, -0.166, 100);
8
9 iframe.src = 'resources/disconnected-frame-already-inner1.html';
10 document.body.appendChild(iframe);
11 });
12
13 function onFirstIframeLoaded() {
14 iframeGeolocation = iframe.contentWindow.navigator.geolocation;
15 iframe.src = 'resources/disconnected-frame-already-inner2.html';
16 }
17
18 function onSecondIframeLoaded() {
19 iframeGeolocation.getCurrentPosition(function () {
20 testFailed('Success callback invoked unexpectedly');
21 finishJSTest();
22 }, function(e) {
23 testFailed('Error callback invoked unexpectedly');
24 finishJSTest();
25 });
26 setTimeout(finishTest, 1000);
27 }
28
29 function finishTest() {
30 debug('Method called on Geolocation object with disconnected Frame.');
31 finishJSTest();
32 }
33
34 window.jsTestIsAsync = true;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698