summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/dom/everything-to-string.html
blob: 4ae9c45fc15efaf5fe623601c771fd0eeafff42d (plain)
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
<html><body>

<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=8131">bug 8131</a>:
Some properties and methods of window and document objects cannot be converted to a string.</p>
<p>Should say SUCCESS:</p>

<script>

if (window.testRunner)
        testRunner.dumpAsText();

try {
  var currProperty;
  try {
    for (var prop in window) {
      currProperty = prop;
      window[prop] + "";
    }

  } catch (ex) {
    document.write('FAILURE (window.' + currProperty + '):' + ex.description);
    throw ex;
  }

  try {
    for (var prop in document) {
      currProperty = prop;
      document[prop] + "";
    }

  } catch (ex) {
    document.write('FAILURE (document.' + currProperty + '):' + ex.description);
    throw ex;
  }

  document.write('SUCCESS');

} catch (ex) {
}

</script>

</body></html>