| Index: chrome/test/data/extensions/platform_apps/windows_api_alpha_enabled/in_stable/background.js
|
| diff --git a/chrome/test/data/extensions/platform_apps/windows_api_alpha_enabled/in_stable/background.js b/chrome/test/data/extensions/platform_apps/windows_api_alpha_enabled/in_stable/background.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..19b77a809b59e17669410735b022ed7678f21b59
|
| --- /dev/null
|
| +++ b/chrome/test/data/extensions/platform_apps/windows_api_alpha_enabled/in_stable/background.js
|
| @@ -0,0 +1,33 @@
|
| +// Copyright 2014 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 error = "The alphaEnabled option requires beta channel or newer.";
|
| +
|
| +function testAlphaEnabled(testId, setValue) {
|
| + var createOptions = { id: testId };
|
| + createOptions.alphaEnabled = setValue;
|
| +
|
| + chrome.app.window.create('index.html',
|
| + createOptions,
|
| + chrome.test.callbackFail(error));
|
| +}
|
| +
|
| +// All these tests are run in Stable channel with app.window.alpha
|
| +// permission set.
|
| +
|
| +chrome.app.runtime.onLaunched.addListener(function() {
|
| + chrome.test.runTests([
|
| +
|
| + // Window is created with alphaEnabled set to true.
|
| + function testAlphaEnabledStableInitTrue() {
|
| + testAlphaEnabled('testAlphaEnabledStableInitTrue', true);
|
| + },
|
| +
|
| + // Window is created with alphaEnabled set to false.
|
| + function testAlphaEnabledStableInitFalse() {
|
| + testAlphaEnabled('testAlphaEnabledStableInitFalse', false);
|
| + },
|
| +
|
| + ]);
|
| +});
|
|
|