From cbc2f44b8c597f360af40ae8db34841a48f6b167 Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Wed, 11 Jan 2017 15:43:36 +0100 Subject: [PATCH] Correct Headers.prototype[Symbol.iterator] test Per feedback in #4523 the original test would never be able to pass. --- fetch/api/headers/headers-basic.html | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/fetch/api/headers/headers-basic.html b/fetch/api/headers/headers-basic.html index 082db0bfea1cc8..1d3f4d462b89f6 100644 --- a/fetch/api/headers/headers-basic.html +++ b/fetch/api/headers/headers-basic.html @@ -69,11 +69,12 @@ }, "Create headers with existing headers"); test(function() { - var headers = new Headers({test:"test"}); - var headers2 = new Headers() - headers2[Symbol.iterator] = headers[Symbol.iterator] - var headers3 = new Headers(headers2) - assert_equals(headers3.get("test"), "test") + var headers = new Headers() + headers[Symbol.iterator] = function *() { + yield ["test", "test"] + } + var headers2 = new Headers(headers) + assert_equals(headers2.get("test"), "test") }, "Create headers with existing headers with custom iterator"); test(function() {