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

Unified Diff: chrome/test/data/extensions/lock_screen_apps/app_launch/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
« no previous file with comments | « chrome/test/BUILD.gn ('k') | chrome/test/data/extensions/lock_screen_apps/app_launch/manifest.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/lock_screen_apps/app_launch/background.js
diff --git a/chrome/test/data/extensions/lock_screen_apps/app_launch/background.js b/chrome/test/data/extensions/lock_screen_apps/app_launch/background.js
new file mode 100644
index 0000000000000000000000000000000000000000..df6090f33842a6833a85c9f80ff0a8f3f15e77c2
--- /dev/null
+++ b/chrome/test/data/extensions/lock_screen_apps/app_launch/background.js
@@ -0,0 +1,32 @@
+// 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) {
+ chrome.test.runTests([
+ function launchTest() {
+ chrome.test.assertTrue(!!data);
+ chrome.test.assertTrue(!!data.actionData);
+ chrome.test.assertEq('new_note', data.actionData.actionType);
+ chrome.test.assertTrue(data.actionData.isLockScreenAction);
+
+ chrome.app.window.create('test.html', {
+ lockScreenAction: 'new_note'
+ }, chrome.test.callbackPass(function(createdWindow) {
+ chrome.test.listenOnce(createdWindow.onClosed,
+ chrome.test.callbackPass(function() {}));
+ }));
+ },
+
+ function cannotCreateWindowWithoutActionLaunch() {
+ chrome.app.window.create('test.html', {
+ lockScreenAction: 'new_note'
+ }, chrome.test.callbackFail('Failed to create the app window.'));
+ },
+
+ function noIdentityAccess() {
+ chrome.test.assertTrue(!chrome.identity);
+ chrome.test.succeed();
+ },
+ ]);
+});
« no previous file with comments | « chrome/test/BUILD.gn ('k') | chrome/test/data/extensions/lock_screen_apps/app_launch/manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698