| OLD | NEW |
| 1 if (self.importScripts) { | 1 if (self.importScripts) { |
| 2 importScripts('../../resources/js-test.js'); | 2 importScripts('../../resources/js-test.js'); |
| 3 | 3 |
| 4 if (!self.postMessage) { | 4 if (!self.postMessage) { |
| 5 // Shared worker. Make postMessage send to the newest client, which in | 5 // Shared worker. Make postMessage send to the newest client, which in |
| 6 // our tests is the only client. | 6 // our tests is the only client. |
| 7 | 7 |
| 8 // Store messages for sending until we have somewhere to send them. | 8 // Store messages for sending until we have somewhere to send them. |
| 9 self.postMessage = function(message) { | 9 self.postMessage = function(message) { |
| 10 if (typeof self.pendingMessages === "undefined") | 10 if (typeof self.pendingMessages === "undefined") |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 // FIXME: List interfaces with NoInterfaceObject specified in their IDL file. | 34 // FIXME: List interfaces with NoInterfaceObject specified in their IDL file. |
| 35 debug('[INTERFACES]') | 35 debug('[INTERFACES]') |
| 36 var interfaceNames = Object.getOwnPropertyNames(this).filter(isConstructor); | 36 var interfaceNames = Object.getOwnPropertyNames(this).filter(isConstructor); |
| 37 interfaceNames.sort(); | 37 interfaceNames.sort(); |
| 38 interfaceNames.forEach(function(interfaceName) { | 38 interfaceNames.forEach(function(interfaceName) { |
| 39 debug('interface ' + interfaceName); | 39 debug('interface ' + interfaceName); |
| 40 var propertyStrings = []; | 40 var propertyStrings = []; |
| 41 var prototype = this[interfaceName].prototype; | 41 var prototype = this[interfaceName].prototype; |
| 42 Object.getOwnPropertyNames(prototype).forEach(function(propertyName) { | 42 Object.getOwnPropertyNames(prototype).forEach(function(propertyName) { |
| 43 var descriptor = Object.getOwnPropertyDescriptor(prototype, propertyName
); | 43 var descriptor = Object.getOwnPropertyDescriptor(prototype, propertyName
); |
| 44 if (typeof descriptor.value !== 'undefined') { | 44 if ('value' in descriptor) { |
| 45 var type = typeof descriptor.value === 'function' ? 'method' : 'attr
ibute'; | 45 var type = typeof descriptor.value === 'function' ? 'method' : 'attr
ibute'; |
| 46 propertyStrings.push(' ' + type + ' ' + propertyName); | 46 propertyStrings.push(' ' + type + ' ' + propertyName); |
| 47 } else { | 47 } else { |
| 48 if (descriptor.get) | 48 if (descriptor.get) |
| 49 propertyStrings.push(' getter ' + propertyName); | 49 propertyStrings.push(' getter ' + propertyName); |
| 50 if (descriptor.set) | 50 if (descriptor.set) |
| 51 propertyStrings.push(' setter ' + propertyName); | 51 propertyStrings.push(' setter ' + propertyName); |
| 52 } | 52 } |
| 53 }); | 53 }); |
| 54 propertyStrings.sort().forEach(debug); | 54 propertyStrings.sort().forEach(debug); |
| 55 }); | 55 }); |
| 56 | 56 |
| 57 if (isWorker()) | 57 if (isWorker()) |
| 58 finishJSTest(); | 58 finishJSTest(); |
| OLD | NEW |