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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/cached-position-called-once.js

Issue 2642873002: Moves mojo.define -> gin.define. (Closed)
Patch Set: rebaseline Created 3 years, 11 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
1 description('Tests that when a cached position is available the callback for get CurrentPosition is called only once. This is a regression test for http://crbug. com/311876 .'); 1 description('Tests that when a cached position is available the callback for get CurrentPosition is called only once. This is a regression test for http://crbug. com/311876 .');
2 2
3 if (!window.testRunner || !window.mojo)
4 debug('This test can not run without testRunner or mojo');
5
6 // Only one success callback should be reported per call to getCurrentPosition. 3 // Only one success callback should be reported per call to getCurrentPosition.
7 var reportCount = 0; 4 var reportCount = 0;
8 var isSuccess; 5 var isSuccess;
9 6
10 function reportCallback(success, id) { 7 function reportCallback(success, id) {
11 isSuccess = success; 8 isSuccess = success;
12 shouldBeTrue('isSuccess'); 9 shouldBeTrue('isSuccess');
13 getCurrentPositionCallId = id; 10 getCurrentPositionCallId = id;
14 shouldBe('getCurrentPositionCallId', 'reportCount'); 11 shouldBe('getCurrentPositionCallId', 'reportCount');
15 if (++reportCount >= 3) 12 if (++reportCount >= 3)
(...skipping 28 matching lines...) Expand all
44 // repeat of the first. 41 // repeat of the first.
45 getPosition(0); 42 getPosition(0);
46 getPosition(100); 43 getPosition(100);
47 getPosition(200); 44 getPosition(200);
48 }, function(error) { 45 }, function(error) {
49 testFailed('Error callback invoked unexpectedly'); 46 testFailed('Error callback invoked unexpectedly');
50 }); 47 });
51 }); 48 });
52 49
53 window.jsTestIsAsync = true; 50 window.jsTestIsAsync = true;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698