| OLD | NEW |
| 1 // Copyright 2012 Google Inc. All Rights Reserved. | 1 // Copyright 2012 Google Inc. All Rights Reserved. |
| 2 | 2 |
| 3 /* | 3 /* |
| 4 Distributed under both the W3C Test Suite License [1] and the W3C | 4 Distributed under both the W3C Test Suite License [1] and the W3C |
| 5 3-clause BSD License [2]. To contribute to a W3C Test Suite, see the | 5 3-clause BSD License [2]. To contribute to a W3C Test Suite, see the |
| 6 policies and contribution forms [3]. | 6 policies and contribution forms [3]. |
| 7 | 7 |
| 8 [1] http://www.w3.org/Consortium/Legal/2008/04-testsuite-license | 8 [1] http://www.w3.org/Consortium/Legal/2008/04-testsuite-license |
| 9 [2] http://www.w3.org/Consortium/Legal/2008/03-bsd-license | 9 [2] http://www.w3.org/Consortium/Legal/2008/03-bsd-license |
| 10 [3] http://www.w3.org/2004/10/27-testcases | 10 [3] http://www.w3.org/2004/10/27-testcases |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 e.parentNode.removeChild(e); | 173 e.parentNode.removeChild(e); |
| 174 }); | 174 }); |
| 175 } | 175 } |
| 176 } | 176 } |
| 177 | 177 |
| 178 function unit(f) { | 178 function unit(f) { |
| 179 return function () { | 179 return function () { |
| 180 var ctx = newContext(); | 180 var ctx = newContext(); |
| 181 try { | 181 try { |
| 182 f(ctx); | 182 f(ctx); |
| 183 } catch(e) { | |
| 184 console.log(e.getMessage()); | |
| 185 } finally { | 183 } finally { |
| 186 cleanContext(ctx); | 184 cleanContext(ctx); |
| 187 } | 185 } |
| 188 } | 186 } |
| 189 } | 187 } |
| 190 | 188 |
| 191 function step_unit(f, ctx, t) { | 189 function step_unit(f, ctx, t) { |
| 192 return function () { | 190 return function () { |
| 193 var done = false; | 191 var done = false; |
| 194 try { | 192 try { |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 } | 262 } |
| 265 | 263 |
| 266 //FIXME This call of initKeyboardEvent works for WebKit-only. | 264 //FIXME This call of initKeyboardEvent works for WebKit-only. |
| 267 //See https://bugs.webkit.org/show_bug.cgi?id=16735 | 265 //See https://bugs.webkit.org/show_bug.cgi?id=16735 |
| 268 // and https://bugs.webkit.org/show_bug.cgi?id=13368. Add check for browser here | 266 // and https://bugs.webkit.org/show_bug.cgi?id=13368. Add check for browser here |
| 269 function fireKeyboardEvent(doc, element, key) { | 267 function fireKeyboardEvent(doc, element, key) { |
| 270 var event = doc.createEvent('KeyboardEvent'); | 268 var event = doc.createEvent('KeyboardEvent'); |
| 271 event.initKeyboardEvent("keydown", true, true, doc.defaultView, key, 0, fals
e, false, false, false); | 269 event.initKeyboardEvent("keydown", true, true, doc.defaultView, key, 0, fals
e, false, false, false); |
| 272 element.dispatchEvent(event); | 270 element.dispatchEvent(event); |
| 273 } | 271 } |
| OLD | NEW |