Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(175)

Unified Diff: chrome/renderer/extensions/extension_api_client_unittest.cc

Issue 160228: Functionality has been requested in the Extension API for Javascript to... (Closed)
Patch Set: added docs Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/extensions/extension_api_client_unittest.cc
diff --git a/chrome/renderer/extensions/extension_api_client_unittest.cc b/chrome/renderer/extensions/extension_api_client_unittest.cc
index 5465a5ce710d4385fce9284b318a8cbcc09c322a..49136c5131ae6757dfea84a5cdab17f6ff972d54 100644
--- a/chrome/renderer/extensions/extension_api_client_unittest.cc
+++ b/chrome/renderer/extensions/extension_api_client_unittest.cc
@@ -422,6 +422,18 @@ TEST_F(ExtensionAPIClientTest, RemoveTab) {
"tabs.remove", "2");
}
+TEST_F(ExtensionAPIClientTest, CaptureVisibleTab) {
+ ExpectJsFail("chrome.tabs.captureVisibleTab(0);",
+ "Uncaught Error: Parameter 1 is required.");
+
+ ExpectJsFail("chrome.tabs.captureVisibleTab(function(){}, 0)",
+ "Uncaught Error: Invalid value for argument 0. "
+ "Expected 'integer' but got 'function'.");
+
+ ExpectJsPass("chrome.tabs.captureVisibleTab(null, function(img){});",
+ "tabs.captureVisibleTab", "null");
+}
+
// Bookmark API tests
// TODO(erikkay) add more variations here
« no previous file with comments | « chrome/common/extensions/docs/tabs.html ('k') | chrome/test/data/extensions/samples/screenshot/manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698