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
3 // found in the LICENSE file.
5 function testAlphaEnabled(testId, setOption, setValue, expectedValue) {
6 var createOptions = { frame: 'none' };
8 createOptions.alphaEnabled = setValue;
10 chrome.app.window.create('index.html',
12 chrome.test.callbackPass(function(win) {
13 chrome.test.assertEq(expectedValue, win.alphaEnabled());
17 // All these tests are run with app.window.alpha permission
18 // set and on a system without alpha (transparency) support.
20 chrome.app.runtime.onLaunched.addListener(function() {
21 chrome.test.runTests([
23 // Window is created with alphaEnabled set to true.
24 function testAlphaEnabledPermNoTransInitTrue() {
25 testAlphaEnabled('testAlphaEnabledPermNoTransInitTrue',
29 // Window is created with alphaEnabled set to false.
30 function testAlphaEnabledPermNoTransInitFalse() {
31 testAlphaEnabled('testAlphaEnabledPermNoTransInitFalse',
35 // Window is created with alphaEnabled not explicitly set.
36 function testAlphaEnabledPermNoTransNoInit() {
37 testAlphaEnabled('testAlphaEnabledPermNoTransNoInit',