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){
22 // All these tests are run with app.window.ime permission set and on a system
23 // with ime window support.
24 chrome.app.runtime.onLaunched.addListener(function() {
25 chrome.test.runTests([
26 // Window is created with ime explicitly set by platform app.
28 function testImeEnabledPermissionWithPlatformApp() {
29 testImeEnabled(true, true);
30 testImeEnabled(true, false);
33 // Window is created with ime not explicitly set.
35 function testImeEnabledPermissionImeNoInit() {
36 testImeEnabled(false);