Index: chrome/test/data/extensions/lock_screen_apps/non_lock_screen_context/background.js |
diff --git a/chrome/test/data/extensions/lock_screen_apps/non_lock_screen_context/background.js b/chrome/test/data/extensions/lock_screen_apps/non_lock_screen_context/background.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..52d74420589ae8fb7060ec13462e456b3787164c |
--- /dev/null |
+++ b/chrome/test/data/extensions/lock_screen_apps/non_lock_screen_context/background.js |
@@ -0,0 +1,21 @@ |
+// Copyright 2017 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.app.runtime.onLaunched.addListener(function(data) { |
+ if (data.actionData.isLockScreenAction) |
+ return; |
+ |
+ chrome.test.runTests([ |
+ function launchTest() { |
+ chrome.test.assertTrue(!!data); |
+ chrome.test.assertTrue(!!data.actionData); |
+ chrome.test.assertEq('new_note', data.actionData.actionType); |
+ |
+ chrome.app.window.create('test.html', { |
+ lockScreenAction: 'new_note' |
+ }, chrome.test.callbackFail( |
+ 'The lockScreenAction option requires lock screen app context.')); |
+ }, |
+ ]); |
+}); |