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

Side by Side Diff: LayoutTests/webexposed/resources/global-interface-listing.js

Issue 1161463009: bindings: Supports [LenientThis] extended attributes. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Added a layout test for [LenientThis]. Created 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/bindings/IDLExtendedAttributes.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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();
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/IDLExtendedAttributes.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698