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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/remove-remote-context-in-error-callback-crash.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 we do not crash when a Geolocation request is made from a remote frame, which is then removed from the DOM in the error callback.");
2
3 function gc() {
4 if (window.GCController) {
5 GCController.collect();
6 return;
7 }
8
9 for (var i = 0; i < 10000; i++)
10 new String(i);
11 }
12
13 function onIframeReady() {
14 // Make request from remote frame
15 iframe.contentWindow.navigator.geolocation.getCurrentPosition(function() {
16 testFailed('Success callback invoked unexpectedly');
17 finishJSTest();
18 }, function() {
19 testPassed('Error callback invoked.');
20 document.body.removeChild(iframe);
21 gc();
22 finishJSTest();
23 });
24 }
25
26 var iframe = document.createElement('iframe');
27 iframe.src = 'resources/remove-remote-context-in-error-callback-crash-inner.html ';
28 document.body.appendChild(iframe);
29
30 window.jsTestIsAsync = true;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698