diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2009-02-14 00:06:01 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2009-02-14 00:06:01 +0000 |
commit | 7ecab92e9a8508c44a758a8ca58defe9a5965bb4 (patch) | |
tree | 069accf001b7f948edcbc9d32433002685abc61a /test/select-auto.c | |
parent | c9899180b84909a15f3dcc17378a60d4e9e9fc3e (diff) | |
download | libcss-7ecab92e9a8508c44a758a8ca58defe9a5965bb4.tar.gz libcss-7ecab92e9a8508c44a758a8ca58defe9a5965bb4.tar.bz2 |
A motley selection of changes. Vague summary:
+ Add config makefile (not that there's anything to configure at present :)
+ Fix dumping of UNIT_MS to actually use sprintf and not printf
+ Extend computed style dumping (still loads of properties missing)
+ Make result buffer larger in select-auto.c -- avoids buffer overflows
when there's way more output than expected
+ Expand expected test output to contain defaulted properties (more of this
will be needed once the computed style dumping is complete)
+ Store interned string pointers in css_select_state.
+ Intern pseudo class/element names at start of selecting styles for a sheet
+ Group properties so we know which ones appear in the extension blocks
+ Fixup unset properties once the cascade has completed
+ Implement matching of pseudo class/element selectors
+ Fix setting of background-image and list-style-image when there's no URL.
svn path=/trunk/libcss/; revision=6470
Diffstat (limited to 'test/select-auto.c')
-rw-r--r-- | test/select-auto.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/select-auto.c b/test/select-auto.c index 75558c4..19af180 100644 --- a/test/select-auto.c +++ b/test/select-auto.c @@ -624,11 +624,11 @@ void run_test(line_ctx *ctx, const char *exp, size_t explen) UNUSED(exp); - buf = malloc(2 * explen); + buf = malloc(8192); if (buf == NULL) { assert(0 && "No memory for result data"); } - buflen = 2 * explen; + buflen = 8192; assert(css_select_ctx_create(myrealloc, NULL, &select) == CSS_OK); @@ -647,10 +647,10 @@ void run_test(line_ctx *ctx, const char *exp, size_t explen) dump_computed_style(computed, buf, &buflen); - if (2 * explen - buflen != explen || memcmp(buf, exp, explen) != 0) { + if (8192 - buflen != explen || memcmp(buf, exp, explen) != 0) { printf("Expected (%zu):\n%.*s\n", explen, (int) explen, exp); - printf("Result (%zu):\n%.*s\n", 2 * explen - buflen, - (int) (2 * explen - buflen), buf); + printf("Result (%zu):\n%.*s\n", 8192 - buflen, + (int) (8192 - buflen), buf); assert(0 && "Result doesn't match expected"); } |