Skip to content

Commit

Permalink
Merge branch 'master' into FLUID-5279
Browse files Browse the repository at this point in the history
  • Loading branch information
cindyli committed Feb 18, 2014
2 parents eda4add + b76917b commit c2e263a
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/framework/core/js/FluidIoC.js
Expand Up @@ -666,7 +666,7 @@ var fluid_1_5 = fluid_1_5 || {};

fluid.filterBuiltinGrades = function (gradeNames) {
return fluid.remove_if(fluid.makeArray(gradeNames), function (gradeName) {
return /autoInit|fluid.littleComponent|fluid.modelComponent|fluid.eventedComponent|fluid.viewComponent|fluid.typeFount/.test(gradeName);
return /^(autoInit|fluid.littleComponent|fluid.modelComponent|fluid.eventedComponent|fluid.viewComponent|fluid.typeFount)$/.test(gradeName);
});
};

Expand Down Expand Up @@ -719,7 +719,7 @@ var fluid_1_5 = fluid_1_5 || {};
return foundComponent;
};

var localRecordExpected = /arguments|options|container|source|sourcePath|change/;
var localRecordExpected = /^(arguments|options|container|source|sourcePath|change)$/;

// unsupported, NON-API function
fluid.makeStackFetcher = function (parentThat, localRecord) {
Expand Down
27 changes: 26 additions & 1 deletion src/tests/framework-tests/core/js/FluidIoCTests.js
Expand Up @@ -302,6 +302,29 @@ fluid.registerNamespace("fluid.tests");
jqUnit.assertUndefined("Event returned to nonpreventable through merge", result);
});

/** FLUID-5239 **/

// dynamically creating name to show that anything starting with "source" will not be resolved by IoC
var name = "source" + fluid.allocateGuid();

fluid.defaults("fluid." + name, {
gradeNames: ["fluid.eventedComponent", "autoInit"]
});

jqUnit.test("FLUID-5239: Component name starting with 'source'", function () {
jqUnit.expect(1);
fluid[name]({
listeners: {
onCreate: {
listener: "jqUnit.assertNotUndefined",
args: ["The reference to {" + name + "} should resolve to the component", "{" + name + "}"]
}
}
});
});

/** end FLUID-5239 **/

/** FLUID-4634 demands exclusion test **/

fluid.defaults("fluid.tests.demandedEvent1", {
Expand Down Expand Up @@ -3456,7 +3479,7 @@ fluid.registerNamespace("fluid.tests");
}
});

jqUnit.test("FLUID-5094: Dynamic grade merging takes the undefined source passed in from IoCSS into account rather than ignoring it", function () {
jqUnit.test("FLUID-5094: Dynamic grade merging takes an undefined source passed in from IoCSS into account rather than ignoring it", function () {
var root = fluid.tests.fluid5094({
gradeName: "fluid.tests.fluid5094Grade"
});
Expand Down Expand Up @@ -3491,6 +3514,7 @@ fluid.registerNamespace("fluid.tests");
var that = fluid.tests.fluid5117();
jqUnit.assertDeepEq("The output of an expander argument is same as the return of the expander function", that.options.inputObject, that.options.outputObject);
});


/** FLUID-5242: Corruption when distributing listener records to multiple components **/

Expand Down Expand Up @@ -3640,6 +3664,7 @@ fluid.registerNamespace("fluid.tests");
jqUnit.assertTrue("Dynamic invoker is called", true);
};


jqUnit.test("Test dynamic grade invoker contribution", function () {
jqUnit.expect(2);
var component = fluid.tests.dynamicInvoker();
Expand Down

0 comments on commit c2e263a

Please sign in to comment.