Bug 1885602 - Part 5: Implement navigating to the SUMO help topic from the menu heade...
[gecko.git] / dom / bindings / test / test_unforgeablesonexpando.html
blob3db4350c9af805308534234d83f766a76271ebeb
1 <!DOCTYPE html>
2 <meta charset=utf-8>
3 <title>Test for making sure named getters don't override the unforgeable location on HTMLDocument</title>
4 <script src="/resources/testharness.js"></script>
5 <script src="/resources/testharnessreport.js"></script>
6 <div id="log"></div>
7 <img name="location">
8 <script>
9 /* global test, assert_equals */
10 test(function() {
11 assert_equals(document.location, window.location,
12 'The <img name="location"> should not override the location getter');
13 }, "document.location is the right thing");
14 test(function() {
15 var doc = new DOMParser().parseFromString("<img name='location'>", "text/html");
16 assert_equals(doc.location, null,
17 'The <img name="location"> should not override the location getter on a data document');
18 }, "document.location is the right thing on non-rendered document");
19 </script>