4 <script src=
"resources/frame-programmatic-resize.js"></script>
6 if (window
.testRunner
) {
7 testRunner
.dumpAsText();
8 testRunner
.dumpChildFramesAsText();
11 window
.onload
= runTests
;
15 if (!window
.eventSender
)
16 return; // Cannot run this test without DRT.
18 description("This tests that frame resizing is allowed and disallowed when programmatically removing and adding the noresize attribute, respectively.");
19 setTestFrameById("testFrame");
21 log("Test disallow frame resize via noResize IDL attribute:");
22 shouldDisallowFrameResizeAfterProcessingFrame(function(frame
) { frame
.noResize
= true });
24 log("\nTest allow frame resize when noResize IDL attribute has value undefined:");
25 shouldAllowFrameResizeAfterProcessingFrame(function(frame
) { frame
.noResize
= undefined });
27 log("\nTest allow frame resize when noResize IDL attribute has value null:");
28 shouldAllowFrameResizeAfterProcessingFrame(function(frame
) { frame
.noResize
= null });
30 log("\nTest disallow frame resize via noresize content attribute:");
31 // Note, noresize is a boolean attribute. That is, its presence indicates true regardless of its value.
32 shouldDisallowFrameResizeAfterProcessingFrame(function(frame
) { frame
.setAttribute("noresize", "true") });
33 shouldDisallowFrameResizeAfterProcessingFrame(function(frame
) { frame
.setAttribute("noresize", "false") });
34 shouldDisallowFrameResizeAfterProcessingFrame(function(frame
) { frame
.setAttribute("noresize", "dummy") });
35 shouldDisallowFrameResizeAfterProcessingFrame(function(frame
) { frame
.setAttribute("noresize", String()) });
37 log("\nTest disallow then allow frame resize via noResize IDL attribute (i.e. increase frame width by " + deltaWidth() + " pixels):");
38 shouldDisallowFrameResizeAfterProcessingFrame(function(frame
) { frame
.noResize
= true });
39 shouldAllowFrameResizeAfterProcessingFrame(function(frame
) { frame
.noResize
= false });
41 log("\nTest disallow then allow frame resize via noresize content attribute (i.e. increase frame width by " + deltaWidth() + " pixels):");
42 shouldDisallowFrameResizeAfterProcessingFrame(function(frame
) { frame
.setAttribute("noresize", "true") });
43 shouldAllowFrameResizeAfterProcessingFrame(function(frame
) { frame
.removeAttribute("noresize") });
47 <frameset cols=
"200,*" border=
"10">
48 <frame id=
"testFrame" name=
"testFrame" src=
"about:blank">
49 <frame id=
"results" name=
"results" src=
"data:text/html,<p id='description'>This test can only be run using DRT.</p><pre id='console'></pre>">