5 if (window
.testRunner
) {
6 testRunner
.dumpAsText();
7 testRunner
.setCanOpenWindows(true);
8 testRunner
.setPopupBlockingEnabled(false);
9 testRunner
.overridePreference('WebKitSupportsMultipleWindows', false);
10 testRunner
.waitUntilDone();
15 if (window
.testRunner
)
16 var windowCount
= testRunner
.windowCount();
17 var result
= window
.open('data:text/html;charset=utf-8,<html><body>The test passes if this page opens in the same window</body></html>');
18 if (window
.testRunner
) {
20 document
.writeln('FAIL: window.open failed. You need popups to be enabled to run this test.');
21 else if (windowCount
!= testRunner
.windowCount())
22 document
.writeln('FAIL: Popup opened in a new window');
24 document
.writeln('PASS: Popup opened in the same window');
25 testRunner
.notifyDone();
29 window
.addEventListener('load', runTest
, true);
33 You need popups to be enabled to run this test.