You're right.
I will submit another patch for API test later. I'm planning to add a new test internal extension, something like how Chromium doing this(chrome/browser/extensions/api/test/test_api.cc).