| Index: chrome/test/data/extensions/platform_apps/restrictions/sandboxed_iframe.js
|
| diff --git a/chrome/test/data/extensions/platform_apps/restrictions/sandboxed_iframe.js b/chrome/test/data/extensions/platform_apps/restrictions/sandboxed_iframe.js
|
| index 08893bbffa334354c26ed7aa45f7eeb29ce01bb7..a71bc9f43403dc615002ddb34330594e42efa299 100644
|
| --- a/chrome/test/data/extensions/platform_apps/restrictions/sandboxed_iframe.js
|
| +++ b/chrome/test/data/extensions/platform_apps/restrictions/sandboxed_iframe.js
|
| @@ -3,17 +3,16 @@
|
| // found in the LICENSE file.
|
|
|
| window.onload = function() {
|
| - try {
|
| - window.alert('should throw');
|
| + window.onunload = function() {
|
| window.parent.postMessage({'success': false,
|
| - 'reason' : 'should have thrown'},
|
| + 'reason' : 'unload handler works'},
|
| '*');
|
| - } catch(e) {
|
| - var message = e.message || e;
|
| - var succ = message.indexOf('is not available in packaged apps') != -1;
|
| - window.parent.postMessage({'success': succ,
|
| - 'reason' : 'got wrong error: ' + message},
|
| + };
|
| + if (typeof(window.unload) !== 'undefined') {
|
| + window.parent.postMessage({'success': false,
|
| + 'reason' : 'unload is not undefined'},
|
| '*');
|
| -
|
| }
|
| + window.dispatchEvent(new Event('unload'));
|
| + window.parent.postMessage({'success': true}, '*');
|
| };
|
|
|