Index: LayoutTests/http/tests/security/javascriptURL/javascriptURL-execution-context-frame-location-htmldom.html |
diff --git a/LayoutTests/http/tests/security/javascriptURL/javascriptURL-execution-context-frame-location-htmldom.html b/LayoutTests/http/tests/security/javascriptURL/javascriptURL-execution-context-frame-location-htmldom.html |
index 1ee1d7e1a138fec41e719aab869696c58fbca264..caf3acf642a5104eb97e94247be14e35a17c1bcb 100644 |
--- a/LayoutTests/http/tests/security/javascriptURL/javascriptURL-execution-context-frame-location-htmldom.html |
+++ b/LayoutTests/http/tests/security/javascriptURL/javascriptURL-execution-context-frame-location-htmldom.html |
@@ -25,15 +25,23 @@ |
runTest(); |
testRunner.notifyDone(); |
} |
+ |
+ setFrameLocation = function(url) { |
+ var frame = document.getElementById('aFrame'); |
+ try { |
+ frame.location = url; |
+ } catch (e) { |
+ console.log("Caught exception while setting frame's location to '" + url + "'. '" + e + "'."); |
+ } |
+ } |
runTest = function() |
{ |
- var frame = document.getElementById('aFrame'); |
- frame.location = 'javascript:"FAIL: this should not have been loaded."'; |
- frame.location = ' javascript:"FAIL: this should not have been loaded."'; |
- frame.location = 'java\0script:"FAIL: this should not have been loaded."'; |
- frame.location = 'javascript\t:"FAIL: this should not have been loaded."'; |
- frame.location = 'javascript\1:"FAIL: this should not have been loaded."'; |
+ setFrameLocation('javascript:"FAIL: this should not have been loaded."'); |
+ setFrameLocation(' javascript:"FAIL: this should not have been loaded."'); |
+ setFrameLocation('java\0script:"FAIL: this should not have been loaded."'); |
+ setFrameLocation('javascript\t:"FAIL: this should not have been loaded."'); |
+ setFrameLocation('javascript\1:"FAIL: this should not have been loaded."'); |
} |
</script> |
</head> |