| Index: chrome/test/data/extensions/platform_apps/web_view/shim/main.js
|
| diff --git a/chrome/test/data/extensions/platform_apps/web_view/shim/main.js b/chrome/test/data/extensions/platform_apps/web_view/shim/main.js
|
| index 976b997c0af9c13bf2769a3078e0c46c86791957..27030b040c7eb5fc6590903a32815e59387509ce 100644
|
| --- a/chrome/test/data/extensions/platform_apps/web_view/shim/main.js
|
| +++ b/chrome/test/data/extensions/platform_apps/web_view/shim/main.js
|
| @@ -2706,6 +2706,23 @@ function testCloseNewWindowCleanup() {
|
| });
|
| }
|
|
|
| +function testFocusWhileFocused() {
|
| + var webview = new WebView();
|
| + webview.src = 'about:blank';
|
| +
|
| + webview.addEventListener('loadstop', function(e) {
|
| + // Focus twice, then make sure that the guest content is still focused.
|
| + webview.focus();
|
| + webview.focus();
|
| + webview.executeScript({code: 'document.hasFocus()'}, function(result) {
|
| + embedder.test.assertTrue(result[0]);
|
| + embedder.test.succeed();
|
| + });
|
| + });
|
| +
|
| + document.body.appendChild(webview);
|
| +}
|
| +
|
| embedder.test.testList = {
|
| 'testAllowTransparencyAttribute': testAllowTransparencyAttribute,
|
| 'testAutosizeHeight': testAutosizeHeight,
|
| @@ -2805,7 +2822,8 @@ embedder.test.testList = {
|
| 'testZoomBeforeNavigation': testZoomBeforeNavigation,
|
| 'testPlugin': testPlugin,
|
| 'testGarbageCollect': testGarbageCollect,
|
| - 'testCloseNewWindowCleanup': testCloseNewWindowCleanup
|
| + 'testCloseNewWindowCleanup': testCloseNewWindowCleanup,
|
| + 'testFocusWhileFocused': testFocusWhileFocused
|
| };
|
|
|
| onload = function() {
|
|
|