Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / Window / customized-property-survives-gc.html
blob008a3c2674174bd3528ae7c0511deeb442c3dd1d
1 <html>
2 <head>
3 <script src="../../../resources/js-test.js"></script>
4 </head>
5 <body>
7 <script>
8 description("This tests that customized properties on window.location and window.navigator won't get lost after garbage collection. Results may be different when run manually, since forcing GC may not be exposed in all applications. Browsers disagree about what happens to properties on window.screen, window.history, and others through 'toolbar' in the list below, but the behavior of window.location and window.navigator is consistent.");
10 function check(name, shouldSurvive) {
11 window[name].myProp = 10;
12 gc();
13 if (shouldSurvive)
14 shouldBe("window." + name + ".myProp", "10");
15 else
16 shouldBeUndefined("window." + name + ".myProp");
19 check("screen", true);
20 check("history", true);
21 check("locationbar", true);
22 check("menubar", true);
23 check("personalbar", true);
24 check("scrollbars", true);
25 check("statusbar", true);
26 check("toolbar", true);
28 check("location", true);
29 check("navigator", true);
30 </script>
31 </body>
32 </html>