Summary:
Max dimension constraints were not correctly passed down to children.
see https://github.com/facebook/css-layout/issues/230 for more info
fixes#230
Reviewed By: gkassabli
Differential Revision: D4147199
fbshipit-source-id: feb335eb8687a1b7939ee8cd8649e455e0c069a9
Summary:
- Update README for gentest
- Fix gentest.rb for the right working dir
Reviewed By: emilsjolander
Differential Revision: D4065863
fbshipit-source-id: 5c6bd9d18779c05c1de24c06a83b148889facb6b
Summary:
- Revise scripts to generate Java and C# unittests using the same HTML fixtures as well as C for code coverage.
- Add wrap_column test workaround in gentest.js.
- Add checkDefaultValues for sanity check of the CSSLayout default values by test-template.html
- Add `align-content: flex-start;` in default div to align with CSSLayout default
$ cd csharp/gentest
$ ruby gentest.rb
- macOS example for C#
$ cd csharp/tests/Facebook.CSSLayout
$ clang -DCSS_ASSERT_FAIL_ENABLED -Wall -Wextra -dynamiclib -o libCSSLayout.dylib -g -I../../.. ../../../CSSLayout/*.c ../../CSSLayout/CSSInterop.cpp
$ mcs -debug -t:library -r:nunit.framework.dll -out:CSSLayoutTest.dll *.cs ../../../csharp/Facebook.CSSLayout/*cs
$ mono64 --debug nunit-console.exe CSSLayoutTest.dll
Reviewed By: emilsjolander
Differential Revision: D4053777
fbshipit-source-id: 84450208015e65baf604987bd56c6a268598b545
Summary: Prefer inline style to computed style as inline style should be the source of truth and computed style may differ
Reviewed By: gkassabli
Differential Revision: D4029373
fbshipit-source-id: 39ce9d577f295c2361dc384212d7467418c63c33
Summary: Its very usefull to be able to run valgrind on the tests and benchmarks. We were previously not freeing test memory so valgrind output was very messy.
Reviewed By: javache
Differential Revision: D3937493
fbshipit-source-id: 23c6970d7769b081575d39de583ba954fc65a397
Summary: Oops, when regexing start->left/right end->left/right I did not take into account flex-start and flex-end. Easiest solution is to regex back flex-left and flex-right into their correct values.
Reviewed By: lucasr
Differential Revision: D3930244
fbshipit-source-id: 20742cbc8e5f23af694e14584c7c3df89526876e
Summary: previously when copying in a test inout into an editor the user of gentest needed to remove the ` * ` prefix. This was annoying so this diff fixes that by removing that from gentest.
Reviewed By: lucasr
Differential Revision: D3862943
fbshipit-source-id: 06bd3ee3fa3f85cc44b6ea1d67cf3e91ed368791
Summary: Make input html easier to read by indenting it and adding a space between children. The code to do this could very well be improved but it works for the current set of inputs.
Reviewed By: lucasr
Differential Revision: D3798087
fbshipit-source-id: 0d50ff276000f14ed078cf5ce2e7560ace285a6a
Summary: Generate tests for border. This required modifying gentest to add the parent clientLeft and clientTop so that border width are accounted for in output.
Reviewed By: lucasr
Differential Revision: D3791286
fbshipit-source-id: 698cc2332a3f4118e1afdfbfd745ba824e8ec3f4
Summary: Allow adding test name within html through the id of the root element. This makes it much easier to re-generate test files.
Differential Revision: D3771966
fbshipit-source-id: 313e1648dcf4521e7c649f54c4ced2aa3297bf06
Summary: These props were never tested so I didn't notice the typo until now.
Differential Revision: D3771132
fbshipit-source-id: 9d7c2037195f29b3cac5d21599035edf3b7830ff
Summary: generate absolute layout tests. Also make sure default value for position is relative (#default div is absolutely positioned)
Reviewed By: IanChilds
Differential Revision: D3770947
fbshipit-source-id: 0327b071c0dc1aa4574ded759dcc667768b28f55
Summary: Remove output properties from computed styles as they will be computed to their output values before we can read them. Only include them if they are explicitly set by the user.
Reviewed By: IanChilds
Differential Revision: D3770917
fbshipit-source-id: e55996cf8744073496debea19c36a188d2e5086c
Summary: Make the test cases absolute to ensure left/top are both zero for each layout in the test case.
Reviewed By: IanChilds
Differential Revision: D3770913
fbshipit-source-id: c3085c2f8709b52fde0af7f47e1417252997b610
Summary: Use const where possible. This does not use const for all variables as that would require too much refactoring for one diff. It does however use const where currently possible as well as does some small refactoring to enable const usage in more locations. Striving for 100% const usage leads to code with is easier to reason about as a reference will always reference the same value. The compiler will also assist if you accidentally override a reference.
Reviewed By: IanChilds
Differential Revision: D3741999
fbshipit-source-id: 1ba7da5784c3047f2d4c03746890192f724aa65e
Summary: Add header to generated code so that code can easily be re-generated in case test generation is improved in the future.
Reviewed By: lucasr
Differential Revision: D3715181
fbshipit-source-id: 593baa691c2d7c7f171c6673898fb8a2ecf0e008
Summary: Modify test generation script to be able to generate multiple test cases
Reviewed By: lucasr
Differential Revision: D3714577
fbshipit-source-id: d2bc2155712f946c5a24231a9532d2acc097524c
Summary: Add support for flex-grow, flex-shrink, and flex-basis properties. The flex property behavior is preserved for backwards compatibility.
Reviewed By: lucasr
Differential Revision: D3714520
fbshipit-source-id: 80d3a9a1e2b6f74b863bbe22357f2c9865fa290e
Summary:
Add first version of test generation script. Currently works for most layouts and styles. Probably has a bunch of broken edge-case.
Usage:
$ gentest/gentest.sh
<Enter HTML with inline styles> e.g. <div style="width: 100px; height: 100px;"></div>
Open chrome dev tools console tab.
Copy code from console into file and save.
Run buck test //:CSSLayout
Differential Revision: D3697812
fbshipit-source-id: e6809f95bf6782e7e2cc47b9cdd3a25a13163c5c