Resolved IE8 test failures
- Additional checks for its buggy defineProperty(), etc implementationclosure/master
parent
18c31cc9e5
commit
94419742c0
|
@ -434,7 +434,8 @@ exports.arrayShrink = function( items )
|
||||||
*
|
*
|
||||||
* @return {Object} descriptor for requested property or undefined if not found
|
* @return {Object} descriptor for requested property or undefined if not found
|
||||||
*/
|
*/
|
||||||
exports.getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor
|
exports.getOwnPropertyDescriptor =
|
||||||
|
( can_define_prop && Object.getOwnPropertyDescriptor )
|
||||||
|| function( obj, prop )
|
|| function( obj, prop )
|
||||||
{
|
{
|
||||||
if ( !Object.prototype.hasOwnProperty.call( obj, prop ) )
|
if ( !Object.prototype.hasOwnProperty.call( obj, prop ) )
|
||||||
|
|
|
@ -22,8 +22,10 @@
|
||||||
* @package test
|
* @package test
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var shared = require( __dirname + '/inc-common' ),
|
var common = require( 'common' ),
|
||||||
es5 = ( typeof Object.defineProperty === 'function' ) ? true : false;
|
shared = require( __dirname + '/inc-common' ),
|
||||||
|
es5 = !( common.require( 'util' ).definePropertyFallback() )
|
||||||
|
;
|
||||||
|
|
||||||
require( 'common' ).testCase(
|
require( 'common' ).testCase(
|
||||||
{
|
{
|
||||||
|
|
|
@ -23,7 +23,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// get-set-test (supported)
|
// get-set-test (supported)
|
||||||
var gst = ( typeof Object.defineProperty === 'function' ) ? true : false;
|
var common = require( 'common' ),
|
||||||
|
gst = !( common.require( 'util' ).definePropertyFallback() )
|
||||||
|
|
||||||
|
|
||||||
require( 'common' ).testCase(
|
require( 'common' ).testCase(
|
||||||
|
|
|
@ -36,7 +36,7 @@ var common = require( './common' ),
|
||||||
*/
|
*/
|
||||||
( function testUtilGetOwnPropertyDescriptorIsObjectsIfAvailable()
|
( function testUtilGetOwnPropertyDescriptorIsObjectsIfAvailable()
|
||||||
{
|
{
|
||||||
if ( Object.getOwnPropertyDescriptor )
|
if ( get_set && Object.getOwnPropertyDescriptor )
|
||||||
{
|
{
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
util.getOwnPropertyDescriptor,
|
util.getOwnPropertyDescriptor,
|
||||||
|
|
Loading…
Reference in New Issue