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

Side by Side Diff: LayoutTests/fast/dom/Geolocation/script-tests/argument-types.js

Issue 336343002: Use "Dictionary" for PositionOptions instead of Custom binding (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebasing for removing PerWorldBindings (http://crrev.com/330293002) Created 6 years, 6 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 the acceptable types for arguments to Geolocation methods."); 1 description("Tests the acceptable types for arguments to Geolocation methods.");
2 2
3 function shouldNotThrow(expression) 3 function shouldNotThrow(expression)
4 { 4 {
5 try { 5 try {
6 eval(expression); 6 eval(expression);
7 testPassed(expression + " did not throw exception."); 7 testPassed(expression + " did not throw exception.");
8 } catch(e) { 8 } catch(e) {
9 testFailed(expression + " should not throw exception. Threw exception " + e) ; 9 testFailed(expression + " should not throw exception. Threw exception " + e) ;
10 } 10 }
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 test('navigator.geolocation.getCurrentPosition(emptyFunction, 42)', true); 57 test('navigator.geolocation.getCurrentPosition(emptyFunction, 42)', true);
58 test('navigator.geolocation.getCurrentPosition(emptyFunction, Infinity)', true); 58 test('navigator.geolocation.getCurrentPosition(emptyFunction, Infinity)', true);
59 test('navigator.geolocation.getCurrentPosition(emptyFunction, -Infinity)', true) ; 59 test('navigator.geolocation.getCurrentPosition(emptyFunction, -Infinity)', true) ;
60 test('navigator.geolocation.getCurrentPosition(emptyFunction, "string")', true); 60 test('navigator.geolocation.getCurrentPosition(emptyFunction, "string")', true);
61 61
62 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, undefin ed)', false); 62 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, undefin ed)', false);
63 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, null)', false); 63 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, null)', false);
64 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {})', f alse); 64 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {})', f alse);
65 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, objectT hrowingException)', true, 'Error: enableHighAccuracy getter exception'); 65 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, objectT hrowingException)', true, 'Error: enableHighAccuracy getter exception');
66 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, emptyFu nction)', false); 66 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, emptyFu nction)', false);
67 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, true)', false); 67 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, true)', true);
68 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, 42)', f alse); 68 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, 42)', t rue);
69 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, Infinit y)', false); 69 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, Infinit y)', true);
70 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, -Infini ty)', false); 70 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, -Infini ty)', true);
71 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, "string ")', false); 71 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, "string ")', true);
72 72
73 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {dummyP roperty:undefined})', false); 73 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {dummyP roperty:undefined})', false);
74 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {dummyP roperty:null})', false); 74 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {dummyP roperty:null})', false);
75 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {dummyP roperty:{}})', false); 75 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {dummyP roperty:{}})', false);
76 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {dummyP roperty:objectThrowingException})', false); 76 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {dummyP roperty:objectThrowingException})', false);
77 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {dummyP roperty:emptyFunction})', false); 77 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {dummyP roperty:emptyFunction})', false);
78 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {dummyP roperty:true})', false); 78 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {dummyP roperty:true})', false);
79 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {dummyP roperty:42})', false); 79 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {dummyP roperty:42})', false);
80 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {dummyP roperty:Infinity})', false); 80 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {dummyP roperty:Infinity})', false);
81 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {dummyP roperty:-Infinity})', false); 81 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {dummyP roperty:-Infinity})', false);
(...skipping 27 matching lines...) Expand all
109 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {timeou t:objectThrowingException})', true, 'Error: valueOf threw exception'); 109 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {timeou t:objectThrowingException})', true, 'Error: valueOf threw exception');
110 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {timeou t:emptyFunction})', false); 110 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {timeou t:emptyFunction})', false);
111 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {timeou t:true})', false); 111 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {timeou t:true})', false);
112 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {timeou t:42})', false); 112 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {timeou t:42})', false);
113 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {timeou t:Infinity})', false); 113 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {timeou t:Infinity})', false);
114 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {timeou t:-Infinity})', false); 114 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {timeou t:-Infinity})', false);
115 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {timeou t:"string"})', false); 115 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {timeou t:"string"})', false);
116 116
117 window.jsTestIsAsync = false; 117 window.jsTestIsAsync = false;
118 118
OLDNEW
« no previous file with comments | « LayoutTests/fast/dom/Geolocation/not-enough-arguments-expected.txt ('k') | Source/bindings/v8/custom/V8GeolocationCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698