Bug 926302 - 2/3: implementation
Bug 926302 - 3/3: test cases.
debug