summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/dom/Window/Location/location-override-toString-on-proto-using-with.html
blob: 130b4627a043864680be47886d6f8f70b3113bf3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<html>
<head>
    <script src="../../../js/resources/js-test-pre.js"></script>
    <script src="resources/location-tests-functions.js"></script>
</head>
<body>
<script>
    with (window.location.__proto__) {
        var toString = function() { return "haxored"; }
    }

    var result = normalizeURL(String(window.location));
    var correctValue = normalizeURL(document.URL);
    shouldBe("result", "correctValue");
</script>
</body>
</html>