Index: test/mjsunit/es6/promises.js |
diff --git a/test/mjsunit/es6/promises.js b/test/mjsunit/es6/promises.js |
index faf154ee0a5f7c421bfd8e126f972ab2e31d37a7..04059aa72095ece37b4f8f32c41321fd9c272924 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 |