Add test for getting different InputMethodContext for different elements.

BUG=none
TEST=layouttest fast/ime

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

git-svn-id: svn://svn.chromium.org/blink/trunk@157439 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Add const versions of some toHTMLFooElement().

We'd like to avoid bare static_cast<const Foo*> too.

BUG=none
TEST=none; no behavior change.

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

git-svn-id: svn://svn.chromium.org/blink/trunk@157440 bbb929c8-8fbe-4397-9dbb-9b2b20218538