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

Side by Side Diff: LayoutTests/webexposed/global-constructors-listing.html

Issue 14958004: Move global-constructors-listing.html test to webexposed/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix paths to JS files Created 7 years, 7 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 <html> 1 <html>
2 <body> 2 <body>
3 <script src="../js/resources/js-test-pre.js"></script> 3 <script src="../fast/js/resources/js-test-pre.js"></script>
4 <script> 4 <script>
5 description("This test documents the Constructor properties on the global window object."); 5 description("This test documents the Constructor properties on the global window object.");
6 6
7 function isConstructor(propertyName) { 7 function isConstructor(propertyName) {
8 var descriptor = Object.getOwnPropertyDescriptor(window, propertyName); 8 var descriptor = Object.getOwnPropertyDescriptor(window, propertyName);
9 if (descriptor.value == undefined || descriptor.value.prototype == undefined ) 9 if (descriptor.value == undefined || descriptor.value.prototype == undefined )
10 return false; 10 return false;
11 return descriptor.writable && !descriptor.enumerable && descriptor.configura ble; 11 return descriptor.writable && !descriptor.enumerable && descriptor.configura ble;
12 } 12 }
13 13
14 var constructorNames = []; 14 var constructorNames = [];
15 var propertyNames = Object.getOwnPropertyNames(window); 15 var propertyNames = Object.getOwnPropertyNames(window);
16 for (var i = 0; i < propertyNames.length; i++) { 16 for (var i = 0; i < propertyNames.length; i++) {
17 if (isConstructor(propertyNames[i])) 17 if (isConstructor(propertyNames[i]))
18 constructorNames[constructorNames.length] = propertyNames[i]; 18 constructorNames[constructorNames.length] = propertyNames[i];
19 } 19 }
20 20
21 constructorNames.sort(); 21 constructorNames.sort();
22 for (var i = 0; i < constructorNames.length; i++) 22 for (var i = 0; i < constructorNames.length; i++)
23 debug(constructorNames[i]); 23 debug(constructorNames[i]);
24 </script> 24 </script>
25 <script src="../js/resources/js-test-post.js"></script> 25 <script src="../fast/js/resources/js-test-post.js"></script>
26 </body> 26 </body>
27 </html> 27 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698