| Index: test/mjsunit/es6/promises.js
|
| diff --git a/test/mjsunit/es6/promises.js b/test/mjsunit/es6/promises.js
|
| index faf154ee0a5f7c421bfd8e126f972ab2e31d37a7..8b75811176f6bacb213872976cb0fc8ab3e1e264 100644
|
| --- a/test/mjsunit/es6/promises.js
|
| +++ b/test/mjsunit/es6/promises.js
|
| @@ -25,13 +25,21 @@
|
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| -// Flags: --allow-natives-syntax
|
| +// Flags: --allow-natives-syntax --harmony-tostring
|
|
|
| // Make sure we don't rely on functions patchable by monkeys.
|
| var call = Function.prototype.call.call.bind(Function.prototype.call)
|
| var observe = Object.observe;
|
| -var getOwnPropertyNames = Object.getOwnPropertyNames
|
| -var defineProperty = Object.defineProperty
|
| +var getOwnPropertyNames = Object.getOwnPropertyNames;
|
| +var defineProperty = Object.defineProperty;
|
| +
|
| +
|
| +(function() {
|
| + // Test before clearing global (fails otherwise)
|
| + assertEquals("[object Promise]",
|
| + Object.prototype.toString.call(new Promise(function() {})));
|
| +})();
|
| +
|
|
|
| function clear(o) {
|
| if (o === null || (typeof o !== 'object' && typeof o !== 'function')) return
|
| @@ -58,6 +66,8 @@ for (var i in globals) {
|
| var name = globals[i]
|
| if (name in whitelist || name[0] === name[0].toLowerCase()) delete globals[i]
|
| }
|
| +
|
| +
|
| for (var i in globals) {
|
| if (globals[i]) clearProp(this, globals[i])
|
| }
|
|
|