Index: chrome/test/data/extensions/platform_apps/disabled_window_properties/test.js |
diff --git a/chrome/test/data/extensions/platform_apps/disabled_window_properties/test.js b/chrome/test/data/extensions/platform_apps/disabled_window_properties/test.js |
index 759c208bf40680156a62610baf229d20d3beda50..572cbb9a17b1656de3002dcc0fe81126b3b4cccb 100644 |
--- a/chrome/test/data/extensions/platform_apps/disabled_window_properties/test.js |
+++ b/chrome/test/data/extensions/platform_apps/disabled_window_properties/test.js |
@@ -4,19 +4,7 @@ |
// NOTE: Some of the test code was put in the global scope on purpose! |
-function useToolbarGetter() { |
- var result; |
- try { |
- // The following will invoke the window.toolbar getter, and this may or may |
- // not throw an exception. |
- result = {object: window.toolbar}; |
- } catch (e) { |
- result = {exception: e}; |
- } |
- return result; |
-} |
- |
-var resultFromToolbarGetterAtStart = useToolbarGetter(); |
+var resultFromToolbarGetterAtStart = window.toolbar; |
// The following statement implicitly invokes the window.toolbar setter. This |
// should delete the "disabler" getter and setter that were set up in |
@@ -24,17 +12,15 @@ var resultFromToolbarGetterAtStart = useToolbarGetter(); |
// getter/setter behaviors from here on. |
var toolbar = {blah: 'glarf'}; |
-var resultFromToolbarGetterAfterRedefinition = useToolbarGetter(); |
+var resultFromToolbarGetterAfterRedefinition = window.toolbar; |
var toolbarIsWindowToolbarAfterRedefinition = (toolbar === window.toolbar); |
toolbar.blah = 'baz'; |
chrome.app.runtime.onLaunched.addListener(function() { |
- chrome.test.assertTrue( |
- resultFromToolbarGetterAtStart.hasOwnProperty('exception')); |
- |
- chrome.test.assertTrue( |
- resultFromToolbarGetterAfterRedefinition.hasOwnProperty('object')); |
+ chrome.test.assertEq('undefined', typeof(resultFromToolbarGetterAtStart)); |
+ chrome.test.assertEq('object', |
+ typeof(resultFromToolbarGetterAfterRedefinition)); |
chrome.test.assertTrue(toolbarIsWindowToolbarAfterRedefinition); |
chrome.test.assertEq('baz', toolbar.blah); |