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

Unified Diff: chrome/test/data/extensions/management/get_self/background.js

Issue 508263003: Add getSelf method to management API to use without the "management" permission. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 6 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/test/data/extensions/management/get_self/background.js
diff --git a/chrome/test/data/extensions/management/get_self/background.js b/chrome/test/data/extensions/management/get_self/background.js
new file mode 100644
index 0000000000000000000000000000000000000000..3d8f48f5b1863632f9c7a2268a3e3d5c8c87f4cb
--- /dev/null
+++ b/chrome/test/data/extensions/management/get_self/background.js
@@ -0,0 +1,11 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+chrome.management.getSelf(function(info) {
+ chrome.test.assertTrue(info != null);
+ chrome.test.assertEq("Self Get Test (no permissions)", info.name);
+ chrome.test.assertEq("extension", info.type);
+ chrome.test.assertEq(true, info.enabled);
+ chrome.test.sendMessage("success");
+});

Powered by Google App Engine
This is Rietveld 408576698