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

Unified Diff: chrome/test/data/extensions/lock_screen_apps/non_lock_screen_context/background.js

Issue 2927303003: Add hooks to allow lock screen app pages in sign-in profile (Closed)
Patch Set: . Created 3 years, 6 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/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.'));
+ },
+ ]);
+});

Powered by Google App Engine
This is Rietveld 408576698