Bug 170535 - test262: module test progressions need updated expectations (@@iterator changes)
Summary: test262: module test progressions need updated expectations (@@iterator changes)
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Joseph Pecoraro
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-05 19:10 PDT by Joseph Pecoraro
Modified: 2017-04-05 21:49 PDT (History)
4 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (9.69 KB, patch)
2017-04-05 20:10 PDT, Joseph Pecoraro
saam: review+
Details | Formatted Diff | Diff
[PATCH] For Landing (11.34 KB, patch)
2017-04-05 21:02 PDT, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2017-04-05 19:10:49 PDT
Summary:
test262: Many module test regressions: TypeError: undefined is not an object (evaluating 'ns[Symbol.iterator].name')

Reduced Test: (save as mod.js)
> import * as ns from './mod.js';
> print(ns[Symbol.iterator]);

Steps to Reproduce:
> $ jsc --module-file=mod.js

Produces undefined, but expected it to be a function.

Failing tests:
test262.yaml/test262/test/language/module-code/namespace/Symbol.iterator/length.js.default: Exception: TypeError: undefined is not an object (evaluating 'ns[Symbol.iterator].length')
test262.yaml/test262/test/language/module-code/namespace/Symbol.iterator/list-iter-next-length.js.default: Exception: TypeError: ns[Symbol.iterator] is not a function. (In 'ns[Symbol.iterator]()', 'ns[Symbol.iterator]' is undefined)
test262.yaml/test262/test/language/module-code/namespace/Symbol.iterator/list-iter-next-name.js.default: Exception: TypeError: ns[Symbol.iterator] is not a function. (In 'ns[Symbol.iterator]()', 'ns[Symbol.iterator]' is undefined)
test262.yaml/test262/test/language/module-code/namespace/Symbol.iterator/list-iter-next-prop-desc.js.default: Exception: TypeError: ns[Symbol.iterator] is not a function. (In 'ns[Symbol.iterator]()', 'ns[Symbol.iterator]' is undefined)
test262.yaml/test262/test/language/module-code/namespace/Symbol.iterator/name.js.default: Exception: TypeError: undefined is not an object (evaluating 'ns[Symbol.iterator].name')
test262.yaml/test262/test/language/module-code/namespace/Symbol.iterator/values-binding-types.js.default: Exception: TypeError: ns[Symbol.iterator] is not a function. (In 'ns[Symbol.iterator]()', 'ns[Symbol.iterator]' is undefined)
test262.yaml/test262/test/language/module-code/namespace/Symbol.iterator/values-order.js.default: Exception: TypeError: ns[Symbol.iterator] is not a function. (In 'ns[Symbol.iterator]()', 'ns[Symbol.iterator]' is undefined)
Comment 1 Joseph Pecoraro 2017-04-05 19:58:06 PDT
I suspect this is actually expected as a result of: r212430
<http://trac.webkit.org/changeset/212430>

[JSC] Update module namespace object according to the latest ECMA262
https://bugs.webkit.org/show_bug.cgi?id=168280

> Reflect updates to the module namespace object.
> 
> 1. @@iterator property is dropped.
> 2. @@toStringTag property becomes non-configurable.
> 3. delete with Symbol should be delegated to the JSObject's one.

In which case we should probably just mark these test262 tests as expecting to fail.
Comment 2 Joseph Pecoraro 2017-04-05 20:09:00 PDT
Yep, I'll update expectations.
Comment 3 Joseph Pecoraro 2017-04-05 20:10:37 PDT
Created attachment 306359 [details]
[PATCH] Proposed Fix
Comment 4 Joseph Pecoraro 2017-04-05 20:39:41 PDT
I'm going to see if I can add a way to add:

    :failDueToOutdatedTest

So that we will know this isn't a failure we need to fix on our end.

I just found some other tests are also ES2017 progressions that I'll want to mark the same way.
Comment 5 Joseph Pecoraro 2017-04-05 21:02:55 PDT
Created attachment 306363 [details]
[PATCH] For Landing
Comment 6 WebKit Commit Bot 2017-04-05 21:42:37 PDT
Comment on attachment 306363 [details]
[PATCH] For Landing

Clearing flags on attachment: 306363

Committed r214985: <http://trac.webkit.org/changeset/214985>