Bug 1915045 Ensure decode tasks are scheduled on BufferingState::Enter() r=media...
[gecko.git] / js / xpconnect / tests / mochitest / file_bug802557.html
blob39f952bc5b4249b27f4d6ddeffd98df0aee316fc
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script>
5 var gTS = window.location.toString;
6 var gGHR = Object.getOwnPropertyDescriptor(window.location, 'href').get;
7 function getTests(fromOuter) {
9 function loc() {
10 return fromOuter ? window.location : location;
12 return {
13 getLocationImplicit: function() {
14 return loc() + "";
16 getLocationExplicit: function() {
17 return loc().toString();
19 getLocationApply1: function() {
20 return gTS.call(loc());
22 getLocationApply2: function() {
23 return gTS.apply(loc(), []);
25 getLocationApply3: function() {
26 return Function.call.apply(gTS, [loc()]);
28 getHref: function() {
29 return loc().href;
31 getHrefViaApply: function() {
32 return Function.call.apply(gGHR, [loc()]);
37 function mungeNames(obj, suffix) {
38 var rv = {};
39 Object.getOwnPropertyNames(obj)
40 .forEach(name => rv[name + suffix] = obj[name]);
41 return rv;
44 function mergeObjects(a, b) {
45 var rv = {};
46 Object.getOwnPropertyNames(a).forEach(name => rv[name] = a[name]);
47 Object.getOwnPropertyNames(b).forEach(name => rv[name] = b[name]);
48 return rv;
51 function getAllTests() {
52 var innerTests = getTests(false);
53 var outerTests = getTests(true);
54 return mergeObjects(mungeNames(innerTests, '_inner'),
55 mungeNames(outerTests, '_outer'));
58 </script>
59 </head>
60 <body>
61 </body>
62 </html>