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

Unified Diff: third_party/WebKit/LayoutTests/fast/loader/stateobjects/pushstate-in-data-url-denied.html

Issue 2694903007: Add a warning for the deprecation of content-initiated data URL navigations (Closed)
Patch Set: creis comments Created 3 years, 10 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: third_party/WebKit/LayoutTests/fast/loader/stateobjects/pushstate-in-data-url-denied.html
diff --git a/third_party/WebKit/LayoutTests/fast/loader/stateobjects/pushstate-in-data-url-denied.html b/third_party/WebKit/LayoutTests/fast/loader/stateobjects/pushstate-in-data-url-denied.html
index 7ccbec0872ff0337c1219d5223371d788dd1e86b..d19bf638e6e35b43b4ebf3d6da0dcbdd8ea19e93 100644
--- a/third_party/WebKit/LayoutTests/fast/loader/stateobjects/pushstate-in-data-url-denied.html
+++ b/third_party/WebKit/LayoutTests/fast/loader/stateobjects/pushstate-in-data-url-denied.html
@@ -3,17 +3,15 @@ if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
-window.onload = function() {
- window.location = 'data:text/html,' +
- '%3Cscript%3E' +
- 'try{' +
- 'history.pushState({},"","data:");' +
- 'document.write("FAIL data URL was manipula via pushState.");' +
- '} catch(e) {' +
- 'document.write("PASS: data URLs cannot be manipulated via pushState.");' +
- '}' +
- 'if (window.testRunner)' +
- 'testRunner.notifyDone();' +
- '%3C/script%3E';
-}
</script>
+<iframe src="data:text/html,
+ <script>
+ try{
+ history.pushState({}, '', 'data:');
+ alert('FAIL data URL was manipulated via pushState.');
+ } catch(e) {
+ alert('PASS: data URLs cannot be manipulated via pushState.');
+ }
+ if (window.testRunner)
+ testRunner.notifyDone();
+ </script>"></iframe>

Powered by Google App Engine
This is Rietveld 408576698