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

Unified Diff: LayoutTests/http/tests/history/cross-origin-replace-history-object-child.html

Issue 19932002: Throw exceptions on all failed cross-origin access checks. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: test. Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/http/tests/history/cross-origin-replace-history-object-child.html
diff --git a/LayoutTests/http/tests/history/cross-origin-replace-history-object-child.html b/LayoutTests/http/tests/history/cross-origin-replace-history-object-child.html
index 7e83528d10b1a64ad59457ef646d0430f83d8787..ec6b1ed98be3dad935929e5304607c115c0f8771 100644
--- a/LayoutTests/http/tests/history/cross-origin-replace-history-object-child.html
+++ b/LayoutTests/http/tests/history/cross-origin-replace-history-object-child.html
@@ -14,14 +14,21 @@ window.onmessage = function(evt)
testRunner.notifyDone();
return;
}
-
- alert("Child window's history object after attempt to clear: " + window.frames[0].history);
+ try {
+ alert("Child window's history object after attempt to clear: " + window.frames[0].history);
+ } catch (e) {
+ alert("PASS: Access to window.frames[0].history threw an exception.");
+ }
testRunner.notifyDone();
}
function setHistoryLength()
{
- alert("Child window's history object before attempt to clear: " + window.frames[0].history);
+ try {
+ alert("Child window's history object before attempt to clear: " + window.frames[0].history);
+ } catch (e) {
+ alert("PASS: Access to window.frames[0].history threw an exception.");
+ }
window.frames[0].postMessage("setHistoryLength", "*");
}

Powered by Google App Engine
This is Rietveld 408576698