summaryrefslogtreecommitdiffstats
path: root/LayoutTests/fast/dom/beforeload/link-before-load.html
blob: ae3c71c747d6153e3cdf3b15642f44a89e9bb1f7 (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
<html>
<head>
<style>
.block {
  width: 100px;
  height: 100px;
  background-color: green;
}
</style>
<link onbeforeload="return false" rel="stylesheet" href="resources/fail.css">
<script src="resources/print.js"></script>
<script>
function test()
{
    if (window.layoutTestController)
        layoutTestController.dumpAsText();

    if (document.getElementById('block').offsetWidth == 100)
        print("PASS", "green");
    else
        print("FAIL", "red");
}
</script>
</head>
<body onload="test()">
<p>This page tests the beforeload event on link elements.  You should see the word PASS below underneath a green square.</p>
<hr>
<div id="block" class="block"></div>
<hr>
<div id="console"></div>