Tests for Bug 976407 and Bug 976406

Tests for Bug 976406 and Bug 976407