| OLD | NEW |
| 1 // Copyright (c) 2011 The Native Client Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 function setupTests(tester, plugin) { | 5 function setupTests(tester, plugin) { |
| 6 // This function takes an array of messages and asserts that the nexe | 6 // This function takes an array of messages and asserts that the nexe |
| 7 // calls PostMessage with each of these messages, in order. | 7 // calls PostMessage with each of these messages, in order. |
| 8 function expectMessages(test, plugin, messages) { | 8 function expectMessages(test, plugin, messages) { |
| 9 test.assert(messages.length > 0, 'Must provide at least one message'); | 9 test.assert(messages.length > 0, 'Must provide at least one message'); |
| 10 var listener = test.wrap(function(message) { | 10 var listener = test.wrap(function(message) { |
| 11 plugin.removeEventListener('message', listener, false); | 11 plugin.removeEventListener('message', listener, false); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 31 }); | 31 }); |
| 32 } | 32 } |
| 33 | 33 |
| 34 addTest('TestCreate'); | 34 addTest('TestCreate'); |
| 35 addTest('TestGetThickness'); | 35 addTest('TestGetThickness'); |
| 36 addTest('TestValue'); | 36 addTest('TestValue'); |
| 37 addTest('TestSetDocumentSize'); | 37 addTest('TestSetDocumentSize'); |
| 38 addTest('TestSetTickMarks'); | 38 addTest('TestSetTickMarks'); |
| 39 addTest('TestScrollBy'); | 39 addTest('TestScrollBy'); |
| 40 } | 40 } |
| OLD | NEW |