summaryrefslogtreecommitdiff
path: root/test/select-auto.c
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-03-22 16:39:32 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-03-22 16:39:32 +0000
commitdcc0deb8e5cc5bf817d60a11b19e226a1bc22bd1 (patch)
treeae2fc7e430e0bbc0ee68e992560f479633aceb51 /test/select-auto.c
parentc58f7a4ff983d282488b7b3413dd3dd572a84ad1 (diff)
downloadlibcss-dcc0deb8e5cc5bf817d60a11b19e226a1bc22bd1.tar.gz
libcss-dcc0deb8e5cc5bf817d60a11b19e226a1bc22bd1.tar.bz2
Fix test harness to actually stand a chance of working.
svn path=/trunk/libcss/; revision=6818
Diffstat (limited to 'test/select-auto.c')
-rw-r--r--test/select-auto.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/select-auto.c b/test/select-auto.c
index daef112..a0e63da 100644
--- a/test/select-auto.c
+++ b/test/select-auto.c
@@ -70,7 +70,8 @@ static void parse_expected(line_ctx *ctx, const char *data, size_t len);
static void run_test(line_ctx *ctx, const char *exp, size_t explen);
static void destroy_tree(node *root);
-static css_error node_name(void *pw, void *node, lwc_context *ctx, lwc_string **name);
+static css_error node_name(void *pw, void *node, lwc_context *ctx,
+ lwc_string **name);
static css_error named_ancestor_node(void *pw, void *node,
lwc_string *name,
void **ancestor);
@@ -156,6 +157,9 @@ int main(int argc, char **argv)
assert(lwc_create_context(myrealloc, NULL, &ctx.dict) == lwc_error_ok);
lwc_context_ref(ctx.dict);
+
+ lwc_context_intern(ctx.dict, "class", SLEN("class"), &ctx.attr_class);
+ lwc_context_intern(ctx.dict, "id", SLEN("id"), &ctx.attr_id);
assert(parse_testfile(argv[2], handle_line, &ctx) == true);
@@ -231,7 +235,6 @@ bool handle_line(const char *data, size_t datalen, void *pw)
ctx->expused = 0;
-
ctx->intree = false;
ctx->insheet = false;
ctx->inerrors = false;
@@ -628,7 +631,8 @@ void run_test(line_ctx *ctx, const char *exp, size_t explen)
testnum++;
assert(css_select_style(select, ctx->target, ctx->pseudo_element,
- ctx->media, computed, &select_handler, ctx) == CSS_OK);
+ ctx->media, NULL, computed, &select_handler, ctx) ==
+ CSS_OK);
dump_computed_style(computed, buf, &buflen);