/*!
 * templateLayout tests
 * Copyright (c) 2011 Pablo Escalada
 * MIT Licensed
 */
TestCase("templateLayout", {
    "test templateLayout registration":function () {
        assertNotUndefined(wef.plugins.registered.templateLayout);
        assertEquals("templateLayout", wef.plugins.registered["templateLayout"].name);
    },
    "test templateLayout namespace":function () {
        assertNotUndefined(wef.plugins.templateLayout);
        assertEquals("templateLayout", wef.plugins.templateLayout.name);
    }
});

AsyncTestCase("templateLayoutAsync", {
    "test templateLayout listen cssParser events":function (queue) {
        //requires cssParser
        var text = "body {display-model: \"a (intrinsic), b (intrinsic)\";} div#uno {situated: a; display-model: \"123 (intrinsic)\";}";
        queue.call(function (callbacks) {
            var myCallback = callbacks.add(function () {
                wef.plugins.registered.templateLayout.templateLayout();
                wef.plugins.registered.cssParser.cssParser().parse(text);
            });
            window.setTimeout(myCallback, 5000);
        });

        queue.call(function () {
            var result = wef.plugins.registered.templateLayout.getLastEvent().property;
            //console.log(result);
            assertEquals("display-model", result);
        })
    }
})
@@ -292,10 +292,9 @@
 ered
-%5B%22
+.
 temp
@@ -307,10 +307,8 @@
 yout
-%22%5D
 .nam
@@ -395,31 +395,26 @@
 defined(wef.
-plugins
+fn
 .templateLay
@@ -462,23 +462,18 @@
 t%22, wef.
-plugins
+fn
 .templat
@@ -891,34 +891,18 @@
     wef.
-plugins.registered
+fn
 .templat
@@ -909,29 +909,19 @@
 eLayout.
-templateLayou
+ini
 t();%0A   
@@ -937,34 +937,18 @@
     wef.
-plugins.registered
+fn
 .cssPars
@@ -950,25 +950,20 @@
 sParser.
-cssParser
+init
 ().parse
@@ -1110,34 +1110,18 @@
 t = wef.
-plugins.registered
+fn
 .templat

Update code to pass tests