| Index: chrome/test/data/extensions/platform_apps/windows_api_ime/no_permissions_whitelisted/background.js
|
| diff --git a/chrome/test/data/extensions/platform_apps/windows_api_ime/no_permissions_whitelisted/background.js b/chrome/test/data/extensions/platform_apps/windows_api_ime/no_permissions_whitelisted/background.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..61756866c309890cc4c4c3f292a30978545eb70f
|
| --- /dev/null
|
| +++ b/chrome/test/data/extensions/platform_apps/windows_api_ime/no_permissions_whitelisted/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 =
|
| + "Extensions require the \"app.window.ime\" permission to create windows.";
|
| +
|
| +function testImeEnabled(imeValue) {
|
| + var createOptions = { frame: 'none' };
|
| + createOptions.ime = imeValue;
|
| +
|
| + chrome.app.window.create('index.html',
|
| + createOptions,
|
| + chrome.test.callbackFail(error));
|
| +}
|
| +
|
| +// All these tests are run without app.window.ime permission set and on a system
|
| +// with ime window support.
|
| +chrome.test.runTests([
|
| +
|
| + // Window is created with ime set to true.
|
| + // Expect fail.
|
| + function testImeNoPermissionImeInitTrue() {
|
| + testImeEnabled(true);
|
| + },
|
| +
|
| + // Window is created with ime set to false.
|
| + // Expect fail.
|
| + function testImeNoPermissionImeInitFalse() {
|
| + testImeEnabled(false);
|
| + }
|
| +
|
| +]);
|
|
|