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

Unified Diff: chrome/test/data/extensions/platform_apps/windows_api_always_on_top/has_permissions_stable/background.js

Issue 159523002: Promote chrome.app.window alwaysOnTop property to stable unwhitelisted (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/extensions/platform_apps/windows_api_always_on_top/has_permissions_stable/background.js
diff --git a/chrome/test/data/extensions/platform_apps/windows_api_always_on_top/has_permissions_stable/background.js b/chrome/test/data/extensions/platform_apps/windows_api_always_on_top/has_permissions_stable/background.js
deleted file mode 100644
index 1fa0aceddeb3500e6bc72507b84624370aa0f7dc..0000000000000000000000000000000000000000
--- a/chrome/test/data/extensions/platform_apps/windows_api_always_on_top/has_permissions_stable/background.js
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2013 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.
-
-var callbackPass = chrome.test.callbackPass;
-
-function testAlwaysOnTop(testId, value) {
- var options = {
- id: testId,
- alwaysOnTop: value
- };
-
- chrome.app.window.create('index.html',
- options,
- callbackPass(function(win) {
- // Check that isAlwaysOnTop() returns false because the feature is not
- // permitted in Stable.
- chrome.test.assertEq(false, win.isAlwaysOnTop());
-
- // Attempt to use setAlwaysOnTop() to change the property. But this should
- // also fail.
- win.setAlwaysOnTop(value);
-
- // setAlwaysOnTop is synchronous in the browser, so send an async request to
- // ensure we get the updated value of isAlwaysOnTop.
- chrome.runtime.getPlatformInfo(callbackPass(function(platformInfo) {
- // Check that isAlwaysOnTop() returns false.
- chrome.test.assertEq(false, win.isAlwaysOnTop());
-
- win.contentWindow.close();
- }));
- }));
-}
-
-chrome.app.runtime.onLaunched.addListener(function() {
- chrome.test.runTests([
-
- // Try to enable alwaysOnTop on window creation and after window creation.
- function testAlwaysOnTopEnable() {
- testAlwaysOnTop('testAlwaysOnTopEnable', true);
- },
-
- // Try to disable alwaysOnTop on window creation and after window creation.
- function testAlwaysOnTopDisable() {
- testAlwaysOnTop('testAlwaysOnTopDisable', false);
- }
-
- ]);
-});

Powered by Google App Engine
This is Rietveld 408576698