Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(722)

Side by Side Diff: chrome/test/data/extensions/api_test/input_ime_nonchromeos/background.js

Issue 1756853002: Correctly sets the security origin for the IME window. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/views/ime/ime_window_browsertest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 chrome.test.runTests([ 5 chrome.test.runTests([
6 function testActivate() { 6 function testActivate() {
7 var focused = false; 7 var focused = false;
8 var activated = false; 8 var activated = false;
9 chrome.input.ime.onFocus.addListener(function(context) { 9 chrome.input.ime.onFocus.addListener(function(context) {
10 if (context.type == 'none') { 10 if (context.type == 'none') {
(...skipping 14 matching lines...) Expand all
25 chrome.test.succeed(); 25 chrome.test.succeed();
26 }); 26 });
27 }, 27 },
28 function testNormalCreateWindow() { 28 function testNormalCreateWindow() {
29 var options = { windowType: 'normal' }; 29 var options = { windowType: 'normal' };
30 chrome.input.ime.createWindow(options, function(win) { 30 chrome.input.ime.createWindow(options, function(win) {
31 chrome.test.assertNoLastError() 31 chrome.test.assertNoLastError()
32 chrome.test.assertTrue(!!win); 32 chrome.test.assertTrue(!!win);
33 chrome.test.assertTrue(win instanceof Window); 33 chrome.test.assertTrue(win instanceof Window);
34 chrome.test.assertFalse(win.document.webkitHidden); 34 chrome.test.assertFalse(win.document.webkitHidden);
35 // test for security origin.
36 win.addEventListener('unload', function() {});
35 chrome.test.succeed(); 37 chrome.test.succeed();
36 }); 38 });
37 }, 39 },
38 function testFollowCursorCreateWindow() { 40 function testFollowCursorCreateWindow() {
39 var options = { windowType: 'followCursor' }; 41 var options = { windowType: 'followCursor' };
40 chrome.input.ime.createWindow(options, function(win) { 42 chrome.input.ime.createWindow(options, function(win) {
41 chrome.test.assertNoLastError() 43 chrome.test.assertNoLastError()
42 chrome.test.assertTrue(!!win); 44 chrome.test.assertTrue(!!win);
43 chrome.test.assertFalse(win.document.webkitHidden); 45 chrome.test.assertFalse(win.document.webkitHidden);
46 // test for security origin.
Devlin 2016/03/04 00:07:51 Please explain how this tests the security origin.
Shu Chen 2016/03/04 11:36:28 Done.
47 win.addEventListener('unload', function() {});
44 chrome.test.succeed(); 48 chrome.test.succeed();
45 }); 49 });
46 } 50 }
47 ]); 51 ]);
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/ime/ime_window_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698