summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/loader/stateobjects/pushstate-in-data-url-denied.html
blob: 7ccbec0872ff0337c1219d5223371d788dd1e86b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<script>
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>