03:12
<hgl>
i was testing if changing a range object (e.g., insert a node) returned by selection should change the selection, and found out browsers behave differently on this one. Should the spec codify this?
03:38
<MikeSmith>
hgl: yeah. But which spec? The Selection API spec?
03:38
<hgl>
I believe so, already opened an issue: https://github.com/w3c/selection-api/issues/25
03:39
<hgl>
hope that's the correct place.
03:42
<MikeSmith>
hgl: yeah I think that's the best
03:43
<hgl>
great, thank you.
03:43
<MikeSmith>
hgl: also, rniwa's usually around here during us/west hours
03:44
<hgl>
cool, would be great if i get to talk to him. :)
03:45
<MikeSmith>
it's only 7:45pm in Cupertino so he may still drop in after he stops by his favorite taco place for dinner :)
03:47
<MikeSmith>
Ben Peters is doing a lot of related spec work on the rich-textediting-related stuff, but I see he's following https://github.com/w3c/selection-api so he'll see your issue
03:49
<hgl>
Thank you for heads up. You know i actually have another question relate to rich text editing, but not sure if it should be in the spec, can i discuss with you here?
03:49
<MikeSmith>
hgl: you can always send messages about issues and comments to public-webapps⊙wo too. Main advantage there is just that a few more people with possible insights will see it.
03:50
<hgl>
i like irc, especially when get quick response. :) but will try out the mail list. thanks
03:50
<MikeSmith>
you can discuss it with me but I'm not keeping up clostely with the current work, so the odds are low that I'll be much help
03:51
<MikeSmith>
hgl: yeah I prefer IRC too and this is definitely the best place to hang out and ask things. But prime time for more people being around here is a few hours earlier than now, when Europe is still awake
03:53
<MikeSmith>
hgl: you can always just ask here -- drop your question in and you may not get a response right away but a lot of people here read scrollback and the logs so you may get an answer later (if you're still here or the next time you /join)
03:53
<hgl>
ok. i was wondering if there is a way to get the pixel location of a collapsed selection (i.e., caret). the only way i can think of is to insert an empty span element and calc it's boundingrect, since the range is empty. do you think the spec should make it easier?
03:54
<hgl>
MikeSmith, that's great, i will definitely hang out here more.
03:56
<hgl>
for a non-empty selection, i can use getBoundingClientRect() on the range object, very convenient, but if the selection is collapsed, i can no longer use this method.
03:57
<MikeSmith>
the way you describe his how I've seen others doing it. I'm not sure how much easier it could be made but anything's possible :) Anyway, it's worth asking more people about -- here or elsewhere. At the very least you'll eventually get an explanation about why it's not practical to provide some easier means (if that's the case) -- which wouldn't be totally satisfying but at least would clarify things for
03:57
<MikeSmith>
you some
03:57
<MikeSmith>
hgl: right
03:57
<MikeSmith>
I remember a very recent discussion here about something similar
03:57
<MikeSmith>
maybe roc knows
03:58
<roc>
Range.getBoundingClientRect should work
03:59
<roc>
it should return a meaningful rectangle even for a collapsed selection, if the collapsed selection is in a text node.
03:59
<hgl>
if the range is collapsed, return rect is 0,0,0,0
03:59
<roc>
which browser?
03:59
<hgl>
i have tested it.
03:59
<hgl>
safari
04:00
<roc>
got a link to a testcase?
04:00
<hgl>
let me set up a demo, wait a sec
04:00
<rniwa>
hgl: it’s defined in http://w3c.github.io/selection-api/#user-interactions
04:00
<roc>
I'm pretty sure that's a Webkit bug, and it should work in Firefox.
04:00
<rniwa>
hgl: the spec matches WebKit/Blink for now
04:02
<roc>
hgl: http://dev.w3.org/csswg/cssom-view/#dom-range-getclientrects
04:03
<roc>
note that if your collapsed range is not in a text node then you will get nothing. How caret works when you're not in a text node is very underspecified and not very interoperably implemented either...
04:04
<hgl>
ok, info avalanche, let me process it one by one.
04:05
<roc>
:-)
04:06
<hgl>
rniwa, "with suitable start and end", "suitable" here seems a bit vague. why not go with firefox and change the selection accordingly? seems more accurate and easy to define.
04:07
<rniwa>
hgl: I think there is a compat issue as far as I could recall.
04:07
<rniwa>
hgl: If I remember correctly, Gecko wanted to change their behavior.
04:08
<hgl>
ok, fair enough.
04:08
<rniwa>
also* wanted
04:08
<hgl>
rniwa, i guess, i could live with that behavior.
04:10
<hgl>
roc, please give me a minute to set up the demo.
04:11
<hgl>
rniwa, i should read the spec more carefully, shouldn't have missed that paragraph. :)
04:12
<rniwa>
hgl: no problem.
04:12
<rniwa>
hgl: i’ll close your issue then :)
04:12
<rniwa>
hgl: I file these bugs all the time as well
04:12
<rniwa>
some specs are hard to read
04:12
<hgl>
rniwa, please do. thanks.
04:14
<jarek>
btw, are there an plans to make getBoundingClientRect() return DOMRect instance?
04:16
<roc>
jarek: you mean in Webkit?
04:16
<jarek>
nvm, I just checked the spec
04:16
<jarek>
it is already mentioning DOMRect
04:16
<jarek>
roc: no, I meant in DOM standard
04:16
<roc>
yeah, it already does :-)
04:18
<hgl>
roc, http://jsbin.com/jafebipexa/3/edit
04:18
<hgl>
roc, click on the hello text, and see the 0 0 0 0 in output div
04:19
<hgl>
roc firefox doesn't have selectionchange event, so currently don't work on it.
04:20
<hgl>
roc, both safari and chrome return 0 0 0 0
04:21
<hgl>
the problem with inserting a span element to calc the position is that it will trigger a selectionchange event
04:21
<roc>
if you trigger the code another way (e.g. setInterval) you'll see that getBoundingClientRect() works in FF
04:22
<roc>
I think the spec agrees
04:23
<hgl>
roc, yes you are right, so do you think it's a bug in webkit and blink?
04:25
<roc>
yeah, that is
04:28
<hgl>
roc, cool. glad to know the spec actually specified it. all i need to do now is to open an issue and figure out a polyfill, thanks. :)
04:30
<hgl>
MikeSmith, thanks again for the liaison. :)
04:53
<hgl>
now, flame suite on. if i got a question with a spec, should i go to whatwg or w3c?
04:57
<roc>
depends on the spec
05:01
<hgl>
all questions relate to these https://whatwg.org/specs/ should be submitted to whatwg, and all else to w3c?
05:04
<roc>
yeah I would
05:05
<hgl>
ok, got it. thanks.
06:33
<hsivonen>
Hixie, annevk: Could you, please, change the <a href> and <form action> references to html5.validator.nu from http to https at https://validator.whatwg.org/ ?
06:35
<Hixie>
done for validator.whatwg.org, any others?
06:36
<hsivonen>
Hixie: thanks. I'm not aware of others.
06:36
<Hixie>
coolio
06:38
<hsivonen>
confirmed: no more cross-scheme form submission warning when using https://validator.whatwg.org/
07:40
<hsivonen>
annevk: http://webforms2.testsuite.org/ redirects to Test the Web Forward. Are the tests actually somewhere in the Web Platform Test git repo?
07:45
<annevk>
hsivonen: I'm not sure, I assume someone has created webforms2 tests
08:10
<hsivonen>
annevk: OK. I take it that you tests have vanished from the Web then
08:10
<hsivonen>
s/you/your/
08:11
<hsivonen>
MikeSmith: https://about.validator.nu/ *finally* gives up-to-date build instructions (by linking to github instead of trying to offer them inline)
08:11
<hsivonen>
MikeSmith: also, I added clarifications that the terms of service and privacy policy do not apply to the W3C instance
09:25
<MikeSmith>
hsivonen: very coolー thanks
09:28
<annevk>
hsivonen: yeah, they didn't seem that useful anymore with all the automated tests
09:28
<MikeSmith>
hsivonen: btw I'd like to change validator.w3.org/nu/ over to TLS some time soon
09:29
<annevk>
hsivonen: kudos on getting TLS btw
09:30
<annevk>
foolip: really, we're going to bring back CDATASection? :-(
09:30
<Ms2ger>
Boo
09:30
<annevk>
foolip: it's not entirely clear to me why we'd restore the node and then not have createCDATASection return an instance of it
09:40
<annevk>
foolip: oh wait, it was one or the other
09:52
<zcorpan>
anyone know how web components work? https://www.w3.org/Bugs/Public/show_bug.cgi?id=27376
09:52
<Ms2ger>
No
09:56
<zcorpan>
where is serializeAsCDATA now?
10:01
<Ms2ger>
Probably nowhere
10:33
<annevk>
zcorpan_: there's no CSS syntax for web components; that idea had a different name and got dropped
10:33
<annevk>
zcorpan_: decorators
10:34
<zcorpan_>
annevk: comment in the bug please :-)
10:47
<hsivonen>
annevk: I'm particularly happy to end the shame of running a site that had login without https (v.nu bugzilla)
10:48
<annevk>
zcorpan_: done
10:48
<zcorpan_>
thx
10:52
smaug____
learns something new, rel=nofollow
10:52
<smaug____>
not that I understand the use case
11:01
<Ms2ger>
smaug____, search engines?
11:09
<zcorpan_>
Ms2ger: do you remember if serializeAsCDATA was for compat or just someone complained?
11:16
<mathiasbynens>
does `itemtype` accept any URL as vocabulary?
11:16
<mathiasbynens>
schema.org now supports TLS, so it would be nice to use https:// instead of http:// in the spec examples if that’s possible https://html.spec.whatwg.org/multipage/semantics.html
11:17
<Ms2ger>
zcorpan_, it seems plausible that serializing cdata sections as text would break things
11:17
<annevk>
mathiasbynens: you could file a bug
11:17
<Ms2ger>
zcorpan_, but nobody tried, so no idea if that's actually the case
11:17
<annevk>
mathiasbynens: changing the URL changes the meaning as well though
11:17
<Ms2ger>
zcorpan_, IIRC, glazou cared quite strongly
11:18
<zcorpan_>
Ms2ger: ok, i'll take that as "someone complained" :-)
11:19
<mathiasbynens>
annevk: that’s what i was wondering about – does it change the meaning if both URLs provide the same vocabulary/response
11:23
<mathiasbynens>
filed https://www.w3.org/Bugs/Public/show_bug.cgi?id=27388
11:23
<annevk>
mathiasbynens: per spec it's just a string that happens to look like a URL
11:23
<annevk>
mathiasbynens: there's no fetching protocol involved afaik
11:24
<annevk>
mathiasbynens: we don't change http://www.w3.org/1999/xhtml either even though it's all sorts of wrong
11:26
<mathiasbynens>
i (naively) assumed vocabularies were somehow different
11:26
<mathiasbynens>
is there a canonical list of vocabulary identifiers/URLs?
11:30
<zcorpan_>
maybe we should change the namespace to https://n.whatwg.org/html
11:48
<annevk>
mathiasbynens: DNS?
11:49
<Ms2ger>
zcorpan_, why not about:blank?
11:50
<zcorpan_>
Ms2ger: it doesn't use TLS
11:50
<Ms2ger>
abouts:blank
11:50
<zcorpan_>
now we're talking
11:50
<mathiasbynens>
i meant vocabularies that are commonly supported by crawlers etc.
12:32
<zcorpan_>
hsivonen: maybe you can emit a warning in the validator when accessed over http?
12:36
<hsivonen>
zcorpan_: hmm. I wonder if API users would want to see an extra warning that doesn't pertain to what they are validating...
12:37
<zcorpan_>
hsivonen: of course they don't. which is why it might be a working incentive for them to switch to https before you force them to switch. they probably won't see your tweet
12:43
<jgraham>
zcorpan_: UnicodeEncodeError: 'charmap' codec can't encode character u'\xe5' in position 81: character maps to <undefined>
12:44
<jgraham>
From wpt html/infrastructure/urls/resolving-urls/query-encoding/resources/css-tmpl.py
12:44
<jgraham>
From /html/infrastructure/urls/resolving-urls/query-encoding/windows-1251.html
12:44
<zcorpan_>
hmm
12:47
<zcorpan_>
jgraham: filed https://github.com/w3c/web-platform-tests/issues/1403 i'll look at it next week
13:26
<buyoancing>
The website https://html.spec.whatwg.org/ has a SSL configuration that allows only RC4 (which is considered weak/broken) and has some other problems, see https://www.ssllabs.com/ssltest/analyze.html?d=html.spec.whatwg.org
13:27
<buyoancing>
"As of 2013, there is speculation that some state cryptologic agencies may possess the capability to break RC4 even when used in the TLS protocol. Microsoft recommends disabling RC4 where possible."
13:33
<buyoancing>
Is there someone here who can fix the configuration?
13:34
<buyoancing>
StartSSL also offers an intermediate certificate with SHA256 btw
13:35
<annevk>
buyoancing: DreamHost
13:35
<annevk>
buyoancing: Hixie could fix the intermediate certificate problem
13:36
<annevk>
(I pointed him to the incorrect intermediate certificate initially, since StartSSL instructions were not super clear :/)
13:37
<buyoancing>
i can provide some apache SSL directives that will give the site an A+ score
13:38
<annevk>
buyoancing: I don't think DreamHost allows that level of configuration
13:39
<annevk>
buyoancing: we need them to upgrade their VPS servers just as they did for their Shared servers
13:39
<annevk>
buyoancing: they've upgraded all Shared servers over the past month or so, so hopefully VPS will happen soon
13:39
<buyoancing>
I see
13:39
<buyoancing>
Anyway, if someone can point them in the right direction, http://pastebin.com/YYitWhgQ has some clues
13:40
<annevk>
That -SSLv2 is still required is somewhat disturbing
13:41
<buyoancing>
Is that Apache's fault or mod_ssl or OpenSSL?
13:42
<annevk>
Apache / mod_ssl I suspect, unless they just pass this straight through to OpenSSL but that doesn't seem like a good idea
13:42
<buyoancing>
perhaps it's required due to the "ALL" before "-SSLv2" ?
13:44
<buyoancing>
"all" is the default
13:44
<buyoancing>
https://httpd.apache.org/docs/current/mod/mod_ssl.html#sslprotocol
13:44
<annevk>
buyoancing: I have no idea; https://wiki.mozilla.org/Security/Server_Side_TLS#Apache recommends the same
13:44
<buyoancing>
it says: "all" is a shortcut for ``+SSLv3 +TLSv1'' or - when using OpenSSL 1.0.1 and later - ``+SSLv3 +TLSv1 +TLSv1.1 +TLSv1.2, respectively
13:45
<buyoancing>
anyway, thanks
13:45
<buyoancing>
TTYL
13:47
<annevk>
Oh he left
13:47
<annevk>
Well I filed https://www.w3.org/Bugs/Public/show_bug.cgi?id=27390 anyway
14:38
<annevk>
This prototype.includes decision fucks over DOMTokenList and DOMStringList (if we can't remove it)
14:40
<annevk>
Maybe TC39 needs a "1Platform" slogan
14:49
<jgraham>
I think the slogan of the web is something like TSBOWTDI;BTWIDFEAAOTSMOTFLRA (There Should Be One Way To Do It; But That Way Is Different For Every API And Often There's More Than One For Legacy Reasons Anyway)
15:37
<smaug____>
How unstable or stable might http://drafts.csswg.org/css-scoping/ be
15:37
<smaug____>
TabAtkins might have an opinion
17:16
<annevk>
Anyone here with input on the security considerations for Encoding? https://www.w3.org/Bugs/Public/show_bug.cgi?id=19961#c3
17:23
<hsivonen>
annevk: isn't a VPS all about having your own virtual server? is it really Dreamhost's responsibility to update the TLS config on Hixie's VPS?
17:24
<annevk>
hsivonen: as far as I can tell DreamHost VPS just means you're guaranteed some set of system resources
17:24
<hsivonen>
annevk: ok. pretty misleading to call that "VPS"
17:24
<annevk>
hsivonen: you could copy yourself on the bug I filed, perhaps Hixie knows more
17:25
<hsivonen>
I guess I can't make Validator.nu emulate Firefox's initial TLS handshake until whatwg.org moves away from its RC4-only state
17:26
<hsivonen>
not that I'm in a particular hurry to do that
17:26
<hsivonen>
but I want to at some point
17:26
<annevk>
WHATWG is holding back the web, you heard it here first
17:27
<annevk>
It's a shame DreamHost took such a long time to start paying attention to this stuff, but then so did I
17:42
<jgraham>
From Dreamhost's page it at least looks like you would expect it to be possible to update the TLS config
17:43
<jgraham>
Since it seems like it's a VM on which you have root
17:57
<annevk>
Yeah sounds likely, not sure if Hixie is game for playing with that
18:01
<annevk>
hsivonen: I'm trying to restore webforms2.testsuite.org, but it's taking a bit longer than expected
18:01
<annevk>
hsivonen: no ETA, something is broken on DreamHost's end :/
18:56
<Hixie>
i'm reluctant to do anything to change the system config because the changes tend to get blown away easily
19:09
<hsivonen>
Hixie: blow away as in Dreamhost overwriting stuff on VPSs?
19:09
<Hixie>
yeah, when you fiddle with the panel for example
19:09
<Hixie>
or when they're trying to fix some problem
19:10
<hsivonen>
oh so a VPS has some management tools connected to it even though you are supposed to have root?
19:10
<Hixie>
you have root, but yes, the management tools also have root.
19:11
<Hixie>
(i'd much rather have the management tools than have root)
19:11
<hsivonen>
I see
19:12
<hsivonen>
I wonder if Dreamhost has always been RC4-only or if this is fallout from the "mitigate BEAST with RC4" meme
21:11
<JonathanNeal>
I’m working to standardize tests for polyfills - something that could benefit multiple polyfill projects or services. Would anyone be interested in collaborating with me on this?
21:18
<JonathanNeal>
Or maybe I should say tests for browser features.
21:20
<Ms2ger>
Too late, we've already done that
21:20
<Ms2ger>
https://github.com/w3c/web-platform-tests
21:22
<JonathanNeal>
oh sweet!
21:24
<JonathanNeal>
Ms2ger: I’m glad I asked. I am hoping to standardize testing suites between the different polyfill projects. I am having trouble finding tests for <Element>.append or Promise. Do you have those, too?
21:24
<Ms2ger>
I don't know where Promise tests are hidden
21:25
<Ms2ger>
Has anyone implemented append()?
21:26
<Ms2ger>
Don't see any functional tests for it in wpt
21:26
<JonathanNeal>
“are hidden” - am i supposed to read into that?
21:26
<jgraham>
Ms2ger: append?
21:26
<Ms2ger>
jgraham, on nodes
21:29
<JonathanNeal>
Ms2ger: I don’t think either are there, at least after surfing through commit logs.
21:29
<Ms2ger>
I think some Promise tests may exist outside wpt
21:29
<Ms2ger>
In my view, that makes them hidden :)
21:31
<JonathanNeal>
some, like there are others inside wpt?
21:31
<jgraham>
Isn't promise in TC39 now?
21:32
<jgraham>
I don't think they are interested in contributing to wpt
21:32
<JonathanNeal>
Well, Domenic has tests. I could port them.
21:32
<JonathanNeal>
If they’re not already perfect ootb.
21:33
<astearns_>
jgraham: I thought test262 had looked into contributing to wpt
21:34
<JonathanNeal>
Wow, and with that (TC39, test262) you’ve almost lost me.
21:35
<jgraham>
astearns_: If so you know more than me
21:35
<JonathanNeal>
Well, I would like to help, or at least integrate with or leverage those tests.
21:35
<jgraham>
I thought that tobie enquired about it at some point but nothing happened
21:36
<JonathanNeal>
How can I help?
21:37
<jgraham>
JonathanNeal: Help with what?
21:38
<JonathanNeal>
Making some of those tests un-“hidden”.
21:38
<jgraham>
JonathanNeal: See if they're at https://github.com/tc39/test262
21:38
<jgraham>
Then see if any vendors import those tests, I guess
21:39
<JonathanNeal>
oh my, that’s a rough testing suite to understand.
21:39
<jgraham>
Looks like Mozilla has http://dxr.mozilla.org/mozilla-central/source/js/src/tests/test262 but I don't know how up to date it is
21:41
<astearns_>
hmm - can't find a reference to what I was thinking of
21:41
<JonathanNeal>
Are those intended to be human readable?
21:42
<JonathanNeal>
human readable / searchable
21:42
<astearns_>
bterlson: do you remember whether test262 was looking into contributing to wpt? Failing that, do you know the state of promises tests?
21:53
bterlson
reads backlog
21:53
<JonathanNeal>
jgraham: it’s hard to tell since so many of the tests use assertions via Promise
21:54
<JonathanNeal>
But maybe in es6/ch25/25.4/25.4.4/25.4.4.1
21:54
<bterlson>
astearns_: I don't htink there have been any discussions about contributing to wpt, but they are OSS and could be adapted by anyone I believe
21:54
<bterlson>
yes, those are the promise tests
21:55
<JonathanNeal>
And they should be hidden from wpt?
21:55
<bterlson>
note that once https://github.com/tc39/test262/issues/107 is finished (probably this weekend) the promise tests will be under lib/Promise
21:55
<bterlson>
also you may want to check out https://github.com/bterlson/test262-harness if you don't want to use the included python harness
21:55
<bterlson>
JonathanNeal: was that question directed at me?
21:56
<sicking>
annevk: ping
21:56
<JonathanNeal>
bterlson: anyone, since i don’t understand the organizational structure of these tests.
21:57
<bterlson>
JonathanNeal: I don't know what "hidden from wpt" means, exactly
21:57
<bterlson>
JonathanNeal: the current organization is based on a hybrid of ES5 and ES6 spec section numbers
21:57
<JonathanNeal>
bterlson: Ms2ger wrote “I don't know where Promise tests are hidden” and “I think some Promise tests may exist outside wpt” “In my view, that makes them hidden :)”
21:57
<bterlson>
but as per 107 we are moving to a more undertandable organization structure
21:58
<bterlson>
I think I disagree with that view :-P
21:59
<bterlson>
the entire goal of test262 is to be exactly what you want it sounds like: a test suite that implementers (including, perhaps especially, polyfill authors) can use
21:59
<Ms2ger>
Would you claim that JS isn't part of the web?
22:00
<JonathanNeal>
I help contribute to https://github.com/Financial-Times/polyfill-service and I’d like to see some standardization of tests. wpt seems very promising but possibly quite behind. Not sure if you were saying tc39 is becoming more readable or if you were talking about wpt or whatever 107 is.
22:00
<bterlson>
JS is part of the web yes. But its domain is not exclusive to the web.
22:01
<bterlson>
JonathanNeal: test262 is standardized tests, and is under active development, and is the official test suite for ECMAScript. Anything polyfilling ECMAScript functionality should be running official ECMA tests.
22:01
<JonathanNeal>
Ideally, I would rather contribute a test to some independent repository and reference it in whatever service I’m using. I would, however, like the tests to be somewhat readable to developers, and be possible to test across all browsers/versions to generate a compatibility list.
22:02
<bterlson>
issue 107 that I linked above is just the details about us changing the organization to be more striaght forward (eg. test/library/Promise for promise tests rather than test/suite/es6/ch25/...)
22:02
<bterlson>
Independent of a standards body you mean?
22:02
<JonathanNeal>
No, independent of the polyfill implementation.
22:02
<bterlson>
Oh, right, I agree
22:03
<bterlson>
sounds like test262 is what you want. There will be some problems to solve TBH, but we share the same goals and so would work to address any problems
22:04
<bterlson>
once issue 107 is addressed, identifying tests by feature and getting pass rates across browsers (or any other JS hosts incluidng node) will be fairly easy. Needs harness work, though I have already started it.
22:05
<Hixie>
wtf http://www.w3.org/2011/tracking-protection/drafts/tracking-dnt.html
22:06
<JonathanNeal>
For instance, there’s https://github.com/polyfills/polyfills and Yahoo is building their own service https://twitter.com/kaelig/status/534335699512999936 and there are numerous other polyfill libraries out there.
22:06
<bterlson>
and meanwhile, the actual polyfills are in various stages of spec compliance, ranging from pretty good to "what is this doing?"
22:09
<bterlson>
JonathanNeal: feel free to email me too if you have long form concerns you want to hash out
22:09
<JonathanNeal>
bterlson: I’ve been a sinner and saint in regards to spec compliance. Sure, let me PM you for deets.
22:10
<JonathanNeal>
But the bigger subject is that we have this big, massively distributed polyfills, and the tests they use also generate compatibility charts, like the kind you see at kangax or caniuse.
22:10
<JonathanNeal>
*have these
22:10
<bterlson>
Yes. I am hoping that test262 can ultimately feed data into Kangax's chart at least. He's open to the idea.
22:10
<JonathanNeal>
So, it would make sense for us to be sharing at least SOME tests, and to be addressing the varying levels of spec compliance.
22:11
<bterlson>
I'd argue that there is little reason not to share all tests. Eg. if ECMA spec says test should pass then it should go in test262. Better for everyone that way. Plus implementers run test262 a lot.
22:11
<JonathanNeal>
For instance, I think it’s reasonable to see a polyfill that matches functionality, but discards aspects of conformance, like the iterability of a method or property, or the argument of some method.
22:12
<JonathanNeal>
Yea, I’ve worked to make all of our tests CC0, so no signing an agreement just to play.
22:12
<bterlson>
I don't know how it can match functionality but also take different arguments
22:12
<bterlson>
thankfully the test262 CLA is super simple
22:12
<JonathanNeal>
*argument lengths
22:12
<bterlson>
ahh
22:13
<JonathanNeal>
function() {} vs function properName() {}, or function () { /* parse arguments */ } function (technicalExpectsAtLeastOneArgument) {}
22:13
<bterlson>
if s/iterability/enumerability/ then I agree with reservations (it probably depends on if iterating over the keys of the object is a common thing)
22:13
<bterlson>
but yeah, no point tanking perf just to have proper enumerability in a case no one will run in to
22:14
<JonathanNeal>
Right, so having a consistent chart, like “A conformance meets these demands (tests), AA conformance meets these demands” even if the browser can’t technically meet AA conformance it’s good to know that a polyfill meets the basic requirements.
22:14
<JonathanNeal>
We’ve run into that ourselves with iterability tests in older browsers.
22:15
<JonathanNeal>
We don’t want to say “sorry, this polyfills fails” when it doesn’t, it just doesn’t conform to iterability.
22:15
<bterlson>
my theory in this area is that developers want to make the call about what "good enough" is for themselves
22:15
<bterlson>
it's a hard thing to prescribe
22:16
<JonathanNeal>
Yes, but some accessibility standards have adopted a pretty good approach, like I’ve referenced with A, AA, AA compliance.
22:16
<JonathanNeal>
*AAA, pardon all the typos.
22:16
<bterlson>
but it takes a judgement call to decide what AAA means, so it seems possible that depending on the tradeoffs made, an A polyfill might be better than AAA. Maybe better just to give information on what passes and fails.
22:17
<bterlson>
can you link me to these tests though? Curious
22:17
<JonathanNeal>
And this seems like a problem for a standards body to address, and I definitely have an immediate need. With Yahoo entering the scene, it seems like we should take it a bit more seriously.
22:17
<bterlson>
agreed
22:17
<bterlson>
well, it's why test262 exists in the first place
22:18
<JonathanNeal>
https://github.com/polyfills/polyfills/blob/master/test/test.js (bundled into one file) https://github.com/Financial-Times/polyfill-service/tree/master/polyfills (packaged with each polyfill)
22:18
<bterlson>
although until recently we've not had a harness that js devs want to use, or done a good job of making the tests accessable
22:19
<JonathanNeal>
And don’t forget https://github.com/es-shims/es5-shim/tree/master/tests
22:19
<JonathanNeal>
Those, I think, are the most widely cited (not including Domenic’s https://github.com/promises-aplus/promises-tests which are exclusively for promises)
22:20
<bterlson>
yeah I briefly talked to Jordan about test262 couple days back at tc39. I think we can share tests with es5/6/7-shim.
22:20
<JonathanNeal>
In the process of creating our own tests, we also noticed that sometimes the caniuse or mdn reports were off (possibly even a few older kangax es5 ones). I think this is because those tests are not automatically generated.
22:21
<bterlson>
the A+ promise tests we decided not to port on the grounds that it also tests promise interaction with non-ECMAScript things like setTimeout
22:22
<Domenic>
and also all vendors are running them anyway
22:22
<JonathanNeal>
Well, for those of you working on these official suites, I would love to involve you in *our discussion or get *us talking to you about using your tests. *our/us as in the various polyfill libs.
22:23
<bterlson>
yes and that
22:23
<bterlson>
yep, love to be included in that discussion :)
22:23
<JonathanNeal>
Domenic: Thoughts? Do you think I’m accurating describing a real problem or just off in my own la la land? Please be honest.
22:24
<Domenic>
JonathanNeal: it would be good if polyfills used and contributed to the standard test repos (viz. web-platform-tests and test262). If you can make it happen, go for it.
22:25
<bterlson>
(viz. used properly is a beautiful thing to behold)
22:26
<JonathanNeal>
If the tests can (as I imagine they should) generate caniuse-like support maps for all browsers, then I can definitely help make that happen.
22:28
<JonathanNeal>
Two things on the testing suite’s end could really help. If the tests could allow lower bands of conformance (re: functional, without conforming to iterability, argument length, or argument name).
22:28
<JonathanNeal>
*method name
22:29
<JonathanNeal>
A good case for method name is Promise prototype’s catch. You can’t name a method catch.
22:29
<JonathanNeal>
Well, you could, but then your JS will surely fail in almost any browser.
22:30
<bterlson>
JonathanNeal: we'll get there in a few weeks. Step 1 is identify tests by feature name, which is almsot complete. Step 2 is teach the harness how to pull categories from a config file and report pass rates by category.
22:30
<JonathanNeal>
The second thing that could really help would be organization of the tests. Some kind of common configuration. Right now, things seem pretty scattered.
22:31
<bterlson>
JonathanNeal: IE8 is the only browser I know of that doesn't like reserved words for property names?
22:31
<JonathanNeal>
Try function catch() {} in whichever browser you please.
22:31
<bterlson>
that's not a property name
22:32
<bterlson>
but say var obj = {catch: 1} is fine
22:32
<JonathanNeal>
Sorry, I thought I said method name.
22:32
<JonathanNeal>
Method name, like right now you can test Promise.prototype.catch.name === “catch"
22:32
<bterlson>
methods are usually attached to objects right? so foo.catch is fine (IE>8)
22:32
<JonathanNeal>
obj.foo can be function bar() {}
22:33
<JonathanNeal>
So, if you test for someFunction.name and someFunction.length you could have a functional polyfill that fails.
22:34
<JonathanNeal>
Or, likewise, a browser that fails the test on those grounds.
22:34
<Domenic>
You can name a method catch in all browsers. You just can't name a function catch.
22:35
<Domenic>
Anyway, tests are meant for browsers, not polyfills, so polyfills will always fail some tests
22:35
<Domenic>
If polyfill authors want to collate a list of "known to be impossible to pass" (or hard to pass) tests, they should do that
22:35
<Domenic>
e.g. like how V8 maintains a list of "known to be slow to run" test262 tests.
22:35
<Domenic>
that's not really part of test262/wpt's job
22:35
<bterlson>
JonathanNeal: Re: your second item, you will find that after this weekend (I hope) the organization will make much more sense.
22:36
<JonathanNeal>
Which testing suite is this for again, bterlson? Is this the one that asked me to sign something?
22:37
<JonathanNeal>
That later question is less important.
22:37
<JonathanNeal>
At least, to me.
22:38
<bterlson>
JonathanNeal: test262 is what I'm talking about
22:38
<JonathanNeal>
Domenic: agreed that “known to be X” might need to exist somewhere else, as long as it’s all iteroperable.
22:38
<JonathanNeal>
If, at the end of the day, I just copied and pasted the tests I liked from wpt or 262, it doesn’t do us much good.
22:39
<JonathanNeal>
In other words, I want browser feature support charts and polyfill support charts that can get gold, silver, or bronze medals that actually mean something and aren’t awarded by ourselves.
22:40
<bterlson>
Sounds like we want the same things :)
22:41
<bterlson>
JonathanNeal: I think the form your "known-tests" would take is a config file for the harness that users can pick up to tell the harness to run only the specific set of tests for whatever "conformance level" you've defined
22:42
<JonathanNeal>
Yes, except that I would need the conformance level to be beyond my implementation, too.
22:42
<JonathanNeal>
conformance levels
23:11
<Hixie>
annevk: it strikes me that realms and global objects can't be the same thing because you can change the global object during runtime of a script (using document.open) but that presumably doesn't change the realm
23:11
<Hixie>
not sure if it changes the global environment record
23:40
<Hixie>
we have 31 domains with a cert
23:40
<Hixie>
each of which takes about 12 seconds to update
23:40
<Hixie>
i am going insane
23:41
<Hixie>
and dreamhost's !@#$%^ portal won't let you just open each one in a new tab and update them all, because they store state in !@#$%^ cookies
23:41
<Hixie>
good work team