forked from mozilla/gecko-dev
-
Notifications
You must be signed in to change notification settings - Fork 2
/
file_bug802557.html
44 lines (42 loc) · 1.09 KB
/
file_bug802557.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<!DOCTYPE html>
<html>
<head>
<script>
var gTS = window.location.toString;
var gGHR = Object.__lookupGetter__.call(window.location, 'href');
var gTests = {
getLocationImplicit: function () {
return window.location + "";
},
getLocationExplicit: function() {
return window.location.toString();
},
getLocationApply1: function() {
return gTS.call(window.location);
},
getLocationApply2: function() {
return gTS.apply(window.location, []);
},
getLocationApply3: function() {
return Function.call.apply(gTS, [window.location]);
},
getLocationViaPrototype: function() {
return Location.prototype.toString.call(window.location);
},
getHref: function() {
return window.location.href;
},
getHrefViaApply: function() {
return Function.call.apply(gGHR, [window.location]);
},
getHrefViaPrototype: function() {
return Object.getOwnPropertyDescriptor(Location.prototype, 'href').get.call(window.location);
}
};
gTests.getLocationViaPrototype.skipMessageCheck = true;
gTests.getHrefViaPrototype.skipMessageCheck = true;
</script>
</head>
<body>
</body>
</html>