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

Side by Side Diff: chrome/test/data/extensions/api_test/management/test/launchType.js

Issue 938603002: Disable bookmark apps on non-ChromeOS platforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var enabled_app, disabled_app, enabled_extension, packaged_app; 5 var enabled_app, disabled_app, enabled_extension, packaged_app;
6 var allLaunchTypes = ["OPEN_AS_REGULAR_TAB", 6 var allLaunchTypes = ["OPEN_AS_REGULAR_TAB",
7 "OPEN_AS_PINNED_TAB", 7 "OPEN_AS_PINNED_TAB",
8 "OPEN_AS_WINDOW", 8 "OPEN_AS_WINDOW",
9 "OPEN_FULL_SCREEN"]; 9 "OPEN_FULL_SCREEN"];
10 10
(...skipping 14 matching lines...) Expand all
25 function getAvailableLaunchTypes(app) { 25 function getAvailableLaunchTypes(app) {
26 var types = Array(); 26 var types = Array();
27 if (app.type == "packaged_app") { 27 if (app.type == "packaged_app") {
28 types.push("OPEN_AS_WINDOW"); 28 types.push("OPEN_AS_WINDOW");
29 return types; 29 return types;
30 } 30 }
31 31
32 types.push("OPEN_AS_REGULAR_TAB"); 32 types.push("OPEN_AS_REGULAR_TAB");
33 types.push("OPEN_AS_WINDOW"); 33 types.push("OPEN_AS_WINDOW");
34 34
35 if (navigator.userAgent.indexOf("CrOS") == -1) {
36 types.push("OPEN_AS_PINNED_TAB");
37 types.push("OPEN_FULL_SCREEN");
38 }
39
35 return types; 40 return types;
36 } 41 }
37 42
38 function verifyAvailableLaunchTypes(expected, actual) { 43 function verifyAvailableLaunchTypes(expected, actual) {
39 assertEq(expected.length, actual.length); 44 assertEq(expected.length, actual.length);
40 for (var i = 0; i < expected.length; i++) 45 for (var i = 0; i < expected.length; i++)
41 assertTrue(actual.indexOf(expected[i]) != -1); 46 assertTrue(actual.indexOf(expected[i]) != -1);
42 } 47 }
43 48
44 function testSetAllLaunchTypes(app) { 49 function testSetAllLaunchTypes(app) {
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 ]; 133 ];
129 134
130 chrome.management.getAll(callback(function(items) { 135 chrome.management.getAll(callback(function(items) {
131 enabled_app = getItemNamed(items, "enabled_app"); 136 enabled_app = getItemNamed(items, "enabled_app");
132 disabled_app = getItemNamed(items, "disabled_app"); 137 disabled_app = getItemNamed(items, "disabled_app");
133 enabled_extension = getItemNamed(items, "enabled_extension"); 138 enabled_extension = getItemNamed(items, "enabled_extension");
134 packaged_app = getItemNamed(items, "packaged_app"); 139 packaged_app = getItemNamed(items, "packaged_app");
135 140
136 chrome.test.runTests(tests); 141 chrome.test.runTests(tests);
137 })); 142 }));
OLDNEW
« chrome/common/chrome_switches.cc ('K') | « chrome/renderer/web_apps.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698