5 if (window
.testRunner
) {
6 testRunner
.dumpAsText();
7 testRunner
.dumpChildFramesAsText();
12 frames
[0].document
.getElementById('console').appendChild(document
.createTextNode(s
));
16 var layoutTestDir
= location
.href
;
17 layoutTestDir
= layoutTestDir
.substring(layoutTestDir
.indexOf("LayoutTests"), layoutTestDir
.lastIndexOf("/"));
19 var frameSrc
= document
.getElementsByTagName('frame')[1].src
;
20 if (frameSrc
.search(layoutTestDir
) != -1)
21 write("PASS: Frame 'src' attribute should include '" + layoutTestDir
+ "' and does.");
23 write("FAIL: Frame 'src' attribute should include '" + layoutTestDir
+ "' but instead is '" + frameSrc
+ "'.");
28 <frameset onload=
"test()">
29 <frame src=
"data:text/html,<p>This test checks whether a frame element's 'src' attribute is a complete, rather than relative, URL.</p><pre id='console'></pre>">
30 <frame src=
"resources/frame-src-attribute-subframe.html">