Description was changed from ========== Add common test configs for properties that take lengths BUG=545318 ...
3 years, 11 months ago
(2017-01-05 06:47:10 UTC)
#3
Description was changed from
==========
Add common test configs for properties that take lengths
BUG=545318
==========
to
==========
Add common test configs for properties that take lengths.
This is a follow-up CL to https://codereview.chromium.org/2371673002, to make
testing of length-accepting properties more complete.
To do this, I added "Length" as a typedom_types for each property in
CSSProperties.in
While I was at it, I also added the valid keywords for those properties.
BUG=545318
==========
This is a follow-up CL to https://codereview.chromium.org/2371673002, where I add tests for the rest of ...
3 years, 11 months ago
(2017-01-05 06:47:46 UTC)
#5
This is a follow-up CL to https://codereview.chromium.org/2371673002, where I
add tests for the rest of the properties that take lengths. PTAL and let me know
if you have some thoughts on my way of pulling out the common logic - I think
this is OK, but there might be something better (or at least better naming)?
Thanks!
sashab
Not sure if I like the idea of a 'common configs' file, that sounds like ...
3 years, 11 months ago
(2017-01-05 22:09:31 UTC)
#6
Not sure if I like the idea of a 'common configs' file, that sounds like a utils
file which usually spells bad news.
Maybe you could turn your method into more of an API, and put the common configs
in the API, e.g.
c = new Config('foo-prop', template='length')
or
c = new Config('foo-prop', ConfigFromTemplate('length'))
or
c = config_templates.length.copy()
c.foo = ...
Have a think :)
https://codereview.chromium.org/2583063002/diff/80001/third_party/WebKit/Layo...
File
third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/common-configs.js
(right):
https://codereview.chromium.org/2583063002/diff/80001/third_party/WebKit/Layo...
third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/common-configs.js:2:
* @fileoverview Generates config objects that are common between multiple
What is @fileoverview? Do we use this anywhere else
https://codereview.chromium.org/2583063002/diff/80001/third_party/WebKit/Layo...
third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/common-configs.js:6:
function lengthConfig(propertyName) {
Maybe createConfigForLengthProperty
https://codereview.chromium.org/2583063002/diff/80001/third_party/WebKit/Layo...
File third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/width.html
(right):
https://codereview.chromium.org/2583063002/diff/80001/third_party/WebKit/Layo...
third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/width.html:8:
let config = lengthPercentConfig('width');
To help with naming, maybe try think about what you want this file to look like,
e.g.:
let config = new Config('width')
config.type = 'length'
config.validKeywords = ['a', 'b', 'c']
runTypedOMTests(config)
What are you going for? :)
meade_UTC10
On 2017/01/05 22:09:31, sashab wrote: > Not sure if I like the idea of a ...
3 years, 11 months ago
(2017-01-16 04:26:15 UTC)
#7
On 2017/01/05 22:09:31, sashab wrote:
> Not sure if I like the idea of a 'common configs' file, that sounds like a
utils
> file which usually spells bad news.
>
> Maybe you could turn your method into more of an API, and put the common
configs
> in the API, e.g.
>
> c = new Config('foo-prop', template='length')
>
> or
>
> c = new Config('foo-prop', ConfigFromTemplate('length'))
>
> or
>
> c = config_templates.length.copy()
> c.foo = ...
>
> Have a think :)
>
>
https://codereview.chromium.org/2583063002/diff/80001/third_party/WebKit/Layo...
> File
>
third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/common-configs.js
> (right):
>
>
https://codereview.chromium.org/2583063002/diff/80001/third_party/WebKit/Layo...
>
third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/common-configs.js:2:
> * @fileoverview Generates config objects that are common between multiple
> What is @fileoverview? Do we use this anywhere else
>
>
https://codereview.chromium.org/2583063002/diff/80001/third_party/WebKit/Layo...
>
third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/common-configs.js:6:
> function lengthConfig(propertyName) {
> Maybe createConfigForLengthProperty
>
>
https://codereview.chromium.org/2583063002/diff/80001/third_party/WebKit/Layo...
> File
third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/width.html
> (right):
>
>
https://codereview.chromium.org/2583063002/diff/80001/third_party/WebKit/Layo...
> third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/width.html:8:
> let config = lengthPercentConfig('width');
> To help with naming, maybe try think about what you want this file to look
like,
> e.g.:
>
> let config = new Config('width')
> config.type = 'length'
> config.validKeywords = ['a', 'b', 'c']
> runTypedOMTests(config)
>
> What are you going for? :)
Hmm, I don't think new Config gets us much, as I expect the majority of configs
to look more similar to animation-direction (which only supports keywords):
https://cs.chromium.org/chromium/src/third_party/WebKit/LayoutTests/typedcsso...
But I changed it to config-templates.js, and added a lengthConfig and a
lengthPercentConfig. This makes each file look like this:
let config = Object.assign({}, config_templates.lengthPercentConfig);
config['property'] = 'left';
config['validKeywords'] = ['auto'];
runInlineStylePropertyMapTests(config);
The only trouble is copying looks kinda weird in js... but unless the template
is used more than once in a single test file, it might be ok to just write
let config = config_templates.lengthPercentConfig;
config['property'] = 'left';
config['validKeywords'] = ['auto'];
runInlineStylePropertyMapTests(config);
WDYT?
meade_UTC10
The CQ bit was checked by meade@chromium.org to run a CQ dry run
3 years, 11 months ago
(2017-01-16 04:28:08 UTC)
#8
https://codereview.chromium.org/2583063002/diff/80001/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/common-configs.js File third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/common-configs.js (right): https://codereview.chromium.org/2583063002/diff/80001/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/common-configs.js#newcode2 third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/common-configs.js:2: * @fileoverview Generates config objects that are common between ...
3 years, 11 months ago
(2017-01-16 04:30:47 UTC)
#10
https://codereview.chromium.org/2583063002/diff/80001/third_party/WebKit/Layo...
File
third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/common-configs.js
(right):
https://codereview.chromium.org/2583063002/diff/80001/third_party/WebKit/Layo...
third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/common-configs.js:2:
* @fileoverview Generates config objects that are common between multiple
On 2017/01/05 22:09:31, sashab wrote:
> What is @fileoverview? Do we use this anywhere else
Haha, it's used in Google3 to autogenerate documentation. It's supposed to be a
1-line summary of the file. Except for the other one that I added, it's only
used in one other place in LayoutTests , lol. Removed.
https://codereview.chromium.org/2583063002/diff/80001/third_party/WebKit/Layo...
third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/common-configs.js:6:
function lengthConfig(propertyName) {
On 2017/01/05 22:09:31, sashab wrote:
> Maybe createConfigForLengthProperty
Changed to config_templates.lengthConfig as per discussion.
https://codereview.chromium.org/2583063002/diff/80001/third_party/WebKit/Layo...
File third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/width.html
(right):
https://codereview.chromium.org/2583063002/diff/80001/third_party/WebKit/Layo...
third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/width.html:8:
let config = lengthPercentConfig('width');
On 2017/01/05 22:09:31, sashab wrote:
> To help with naming, maybe try think about what you want this file to look
like,
> e.g.:
>
> let config = new Config('width')
> config.type = 'length'
> config.validKeywords = ['a', 'b', 'c']
> runTypedOMTests(config)
>
> What are you going for? :)
Changed to the following:
let config = Object.assign({}, config_templates.lengthPercentConfig);
config['property'] = 'left';
config['validKeywords'] = ['auto'];
runInlineStylePropertyMapTests(config);
sashab
Looks much better, thanks :) Just one small thing - what is Object.assign? Does that ...
3 years, 11 months ago
(2017-01-16 04:48:03 UTC)
#11
Looks much better, thanks :)
Just one small thing - what is Object.assign? Does that do the shallow copy?
Don't really like the idea of having that in all the files... Can we add that as
a global method maybe
So the first line can be config.copyConfig(config) or whatever :)
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
3 years, 11 months ago
(2017-01-16 05:51:22 UTC)
#12
3 years, 11 months ago
(2017-01-16 05:51:23 UTC)
#13
Dry run: This issue passed the CQ dry run.
meade_UTC10
On 2017/01/16 04:48:03, sashab wrote: > Looks much better, thanks :) > > Just one ...
3 years, 9 months ago
(2017-03-08 04:03:25 UTC)
#14
On 2017/01/16 04:48:03, sashab wrote:
> Looks much better, thanks :)
>
> Just one small thing - what is Object.assign? Does that do the shallow copy?
> Don't really like the idea of having that in all the files... Can we add that
as
> a global method maybe
>
> So the first line can be config.copyConfig(config) or whatever :)
Sorry for letting this sit so long...
Object.assign is how you copy things in Javascript - it does do a shallow copy.
I don't know why it's named weird...
Added a helper function so you don't have to see it in the test files.
Dry run: Try jobs failed on following builders: android_compile_dbg on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_compile_dbg/builds/225029) chromeos_amd64-generic_chromium_compile_only_ng on ...
3 years, 9 months ago
(2017-03-08 04:14:33 UTC)
#20
Dry run: Try jobs failed on following builders: android_arm64_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_arm64_dbg_recipe/builds/224063) android_clang_dbg_recipe on ...
3 years, 9 months ago
(2017-03-08 04:20:56 UTC)
#24
CQ is committing da patch. Bot data: {"patchset_id": 220001, "attempt_start_ts": 1489037553396590, "parent_rev": "532d98e5dc972e8e267bac9523f114cd2117702e", "commit_rev": "4d77a388ceb8b2742c2ee4f0d2c8cc09a0aab4c6"}
3 years, 9 months ago
(2017-03-09 07:20:07 UTC)
#28
CQ is committing da patch.
Bot data: {"patchset_id": 220001, "attempt_start_ts": 1489037553396590,
"parent_rev": "532d98e5dc972e8e267bac9523f114cd2117702e", "commit_rev":
"4d77a388ceb8b2742c2ee4f0d2c8cc09a0aab4c6"}
commit-bot: I haz the power
Description was changed from ========== Add common test configs for properties that take lengths. This ...
3 years, 9 months ago
(2017-03-09 07:21:14 UTC)
#29
Message was sent while issue was closed.
Description was changed from
==========
Add common test configs for properties that take lengths.
This is a follow-up CL to https://codereview.chromium.org/2371673002, to make
testing of length-accepting properties more complete.
To do this, I added "Length" as a typedom_types for each property in
CSSProperties.in
While I was at it, I also added the valid keywords for those properties.
BUG=545318
==========
to
==========
Add common test configs for properties that take lengths.
This is a follow-up CL to https://codereview.chromium.org/2371673002, to make
testing of length-accepting properties more complete.
To do this, I added "Length" as a typedom_types for each property in
CSSProperties.in
While I was at it, I also added the valid keywords for those properties.
BUG=545318
Review-Url: https://codereview.chromium.org/2583063002
Cr-Commit-Position: refs/heads/master@{#455687}
Committed:
https://chromium.googlesource.com/chromium/src/+/4d77a388ceb8b2742c2ee4f0d2c8...
==========
commit-bot: I haz the power
Committed patchset #12 (id:220001) as https://chromium.googlesource.com/chromium/src/+/4d77a388ceb8b2742c2ee4f0d2c8cc09a0aab4c6
3 years, 9 months ago
(2017-03-09 07:21:15 UTC)
#30
Issue 2583063002: Add common test configs for properties that take lengths
(Closed)
Created 4 years ago by meade_UTC10
Modified 3 years, 9 months ago
Reviewers: nainar, sashab
Base URL:
Comments: 6