add a test for a component created in code

Review URL: https://chromiumcodereview.appspot.com//12614012