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 var error = "The \"ime\" option is not supported for platform app.";
7 function testImeEnabled(setOption, opt_setValue) {
8 var createOptions = { frame: 'none' };
10 createOptions.ime = opt_setValue;
11 chrome.app.window.create('index.html',
13 chrome.test.callbackFail(error));
15 chrome.app.window.create('index.html',
17 chrome.test.callbackPass(function(win){}));
21 // All these tests are run without app.window.ime permission set and on a system
22 // with ime window support.
23 chrome.app.runtime.onLaunched.addListener(function() {
24 chrome.test.runTests([
25 // Window is created with ime explicitly set by platform app.
27 function testImeNoPermissionImeInitTrue() {
28 testImeEnabled(true, true);
29 testImeEnabled(true, false);
32 // Window is created with ime not explicitly set.
33 function testImeNoPermissionImeNoInit() {
34 testImeEnabled(false);