Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the test of input type=month #155

Merged
merged 3 commits into from
Jun 8, 2013

Conversation

Asterisk-works
Copy link

I added the test of input type=month.

@odinho
Copy link
Contributor

odinho commented Jun 8, 2013

w3c:mirror

@cynthia
Copy link
Contributor

cynthia commented Jun 8, 2013

@velmont What do you mean from the last comment?


test(function() {
assert_equals(document.getElementById("valid").min, "2011-01"),
assert_not_equals(document.getElementById("invalid_min").min, "invalid_min")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should rather test for what it should be in these. Reading the spec, since this is a DOMString (wo ?) and it doesn't seem to define a default min, it should probably be "". Were you seeing different browser behaviour? Maybe the spec needs to be changed?

@odinho
Copy link
Contributor

odinho commented Jun 8, 2013

@cynthia That should sync the test to the w3c-test.org server to check out and run there. However, it didn't work because I probably wrote it wrong or something 📦

@Asterisk-works Thank you for the test! I'm mostly wondering about the usage of assert_not_equals, it's better to be specific about what it tests when the spec more or less says what it does. Based on how I read it, the date parsing algorithms returns nothing, and that would in a DOMString that doesn't take null be encoded to the empty string IIRC.

Also, you should also maybe test dates like "2011-1" because people might use them, but they must not work in any browser, because if they work one place - some people will use it, and hey: we've got incompatibilities.

Possibly, this could rather be a full "invalid_dates" test in fact. Where you have a list of invalid dates, and iterate through all of them and see that they do not work. This might very well be out of scope for what you test here (because it's not really the date parsing algorithm, but the element you test).

Other than that, I'm also missing some javascript-tryouts. The min/max and value should take Date and do the correct thing. Also valueAsDate should work for the non-invalid values.

But everything other than looking up assert_not_equals is extras, so this looks fine. It can always be expanded later :-)

@Asterisk-works
Copy link
Author

Thank you for your comments.
I will fix assert_not_equals first, and the rest if I have time.

@odinho
Copy link
Contributor

odinho commented Jun 8, 2013

Cool, you're on it now? (or are you guys eating?). It'd be cool to get it in, since some other test is blocking on this one :-)

@odinho
Copy link
Contributor

odinho commented Jun 8, 2013

So this is good, except for the bug introduced. I know I said 2011-1, but that's supposed to be an invalid value ;-) Sorry about that man!

@Asterisk-works
Copy link
Author

Sorry, I will fix it.

@odinho
Copy link
Contributor

odinho commented Jun 8, 2013

Okay, thank you man! :D

odinho added a commit that referenced this pull request Jun 8, 2013
TestTWF, Asterisk-works: the test of input type=month
@odinho odinho merged commit c916bac into web-platform-tests:master Jun 8, 2013
jugglinmike pushed a commit to bocoup/wpt that referenced this pull request Apr 11, 2017
jgraham pushed a commit that referenced this pull request Apr 13, 2017
This function call has global side-effects on the `logging` module and
is therefor inappropriate for use within utility code.

Configure this project's logging interface with a dedicated output
stream which is independent from those that may be in use by the
consuming code.

> ### `logging.basicConfig([**kwargs])`
>
> Does basic configuration for the logging system by creating a
> `StreamHandler` with a default `Formatter` and adding it to the root
> logger. The functions `debug()`, `info()`, `warning(`), `error()` and
> `critical()` will call `basicConfig()` automatically if no handlers
> are defined for the root logger.

source: https://docs.python.org/2/library/logging.html#logging.basicConfig
jgraham added a commit that referenced this pull request Apr 21, 2017
Use glob on include/exclude paths
AutomatedTester referenced this pull request in AutomatedTester/web-platform-tests Dec 1, 2017
AutomatedTester referenced this pull request in AutomatedTester/web-platform-tests Dec 1, 2017
foolip added a commit that referenced this pull request May 18, 2018
68a37d21e8 chore(package): bump version number to 12.1.0
621d0b6c17 fix: prevent keywords from being identifiers (#157)
9ad8932034 chore(package): bump version number to 12.0.0
a154b63cea BREAKING CHANGE: remove allowNestedTypedefs (#155)
5a495f76a5 refactor: remove all_ws() and gather trivia implicitly (#154)
e717aa67fa tests: Remove test/widlproc (#153)
131e74cc57 chore(package): bump version number to 11.0.0
09f8a1daae Prevent incorrect enums (#151)
fa060611a9 BREAKING CHANGE: remove opt.ws (#150)
2bb4e1cbb2 chore(package): bump version number to 10.3.3 (#149)
80936fa3c9 oefactor simple_extended_attr() (#148)
c060079cca docs: remove description about typePair (#147)
4169268630 docs: simple WebIDL checker. (#146)
a28c7b55f7 chore(package): bump version number to 10.3.2
e311680dc0 fix: correctly handle whitespaces of implements and includes. (#145)
50c828344d refactor: remove eas.length check (#144)
968ca63fd4 refactor: one-to-one match for token matcher (#143)
8531535861 chore(package): bump version number to 10.3.1
96deeb3480 const-type as full IDL Type (#142)
a13dfa8cf5 chore(package): bump version number to 10.3.0
c0ab164af2 always add extAttrs for .idlType (#141)
932dcfb96d docs(README): add missing typedef-type
56777f49dc docs(README): add missing types-of-types
c14d7c1767 docs(README): add types of types (#140)
730a3b99db chore(CHANGELOG): regenerate

git-subtree-dir: resources/webidl2
git-subtree-split: 68a37d21e81740563a5e98198e0e979232d363c0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants