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

Side by Side Diff: chrome/test/data/extensions/lock_screen_apps/app_launch/test.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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 chrome.test.runTests([
6 function noAccessToIdentity() {
7 chrome.test.assertTrue(!chrome.identity);
8 chrome.test.succeed();
9 },
10
11 function hasAccessToCurrentWindow() {
12 chrome.test.assertTrue(!!chrome.app.window.current);
13 chrome.test.assertTrue(!!chrome.app.window.current());
14 chrome.test.assertTrue(chrome.app.window.current().isMaximized());
15 chrome.test.succeed();
16 },
17
18 function cannotCreateSecondWindow() {
19 chrome.app.window.create('test.html', {
20 lockScreenAction: 'new_note'
21 }, chrome.test.callbackFail('Failed to create the app window.'));
22 },
23
24 function reportReadyToClose() {
25 // Notify the test runner the app window is ready to be closed - if the test
26 // runner replies with 'close', close the current app window. Otherwise, the
27 // test runner will close the window itself.
28 // NOTE: Reporting the test success should not wait for this - the test
29 // runner should be notified of test run success before responding to
30 // this message to avoid test done message being disregarded due to app
31 // window clusure.
32 chrome.test.sendMessage('readyToClose', function(response) {
33 if (response === 'close')
34 chrome.app.window.current().close();
35 });
36
37 chrome.test.succeed();
38 },
39 ]);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698