[Extensions Bindings] Move CrazyExtensionTest.Crazy to bindings apitests

CrazyExtensionTest.Crazy tests the result of calling into the app API
of a removed context. Conceptually, this is very similar to other
extension bindings API tests, and would benefit from constant tree
coverage with both JS and native bindings. Move the test to the
ExtensionBindingsApiTest suite, and have it run with both JS and native
bindings.

Additionally, the behavior for native and JS bindings is slightly
different when accessing invalidated contexts' APIs: Native bindings
throw an error, whereas JS bindings do not. Adjust the test expectations
accordingly.

Also rename the test to something slightly more descriptive
(s/Crazy/UseAppAPIAfterFrameRemoval).

Bug: 653596
Test: browser_tests --gtest_filter=*UseAppAPIAfterFrameRemoval*

Change-Id: Ic9c1615eda03320262d04c9760bc7879b2af78c5
Reviewed-on: https://chromium-review.googlesource.com/898397
Reviewed-by: Istiaque Ahmed <[email protected]>
Commit-Queue: Devlin <[email protected]>
Cr-Commit-Position: refs/heads/master@{#534103}
diff --git a/chrome/browser/extensions/extension_bindings_apitest.cc b/chrome/browser/extensions/extension_bindings_apitest.cc
index ccb134b09..14081be 100644
--- a/chrome/browser/extensions/extension_bindings_apitest.cc
+++ b/chrome/browser/extensions/extension_bindings_apitest.cc
@@ -427,6 +427,12 @@
   EXPECT_TRUE(RunExtensionTest("bindings/invalidate_context")) << message_;
 }
 
+// TODO(devlin): Can this be combined with
+// ExtensionBindingsApiTest.UseAPIsAfterContextRemoval?
+IN_PROC_BROWSER_TEST_P(ExtensionBindingsApiTest, UseAppAPIAfterFrameRemoval) {
+  ASSERT_TRUE(RunExtensionTest("crazy_extension"));
+}
+
 // Run core bindings API tests with both native and JS-based bindings. This
 // ensures we have some minimum level of coverage while in the experimental
 // phase, when native bindings may be enabled on trunk but not at 100% stable.