From c87074c5ec5a447a08a3c5a3a972eff4648c53ed Mon Sep 17 00:00:00 2001 From: Marc Jansen Date: Thu, 27 Nov 2014 10:23:24 +0100 Subject: [PATCH] Change the hiding strategy of the test_iframe. This commit contains three changes: * First, the test_iframe is taken out of span with `display: none`, so that it is initially visible * That iframe is hidden via absolute positioning now and negative `top` and `left` values * Also inttroduced is a configurable delay for when the test_iframe actally considers a test page being done loading and signaling the test-suite that it can continue with running the tests. --- tests/Test.AnotherWay.css | 8 ++++++++ tests/Test.AnotherWay.js | 1 + tests/run-tests.html | 3 +-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/Test.AnotherWay.css b/tests/Test.AnotherWay.css index 5bb118115..67832e4da 100644 --- a/tests/Test.AnotherWay.css +++ b/tests/Test.AnotherWay.css @@ -240,4 +240,12 @@ body { #record_input { width: 53%; +} +#taw-test-iframe { + padding: 0; + width: 200px; + height: 200px; + position: absolute; + top: -1000px; + left: -1000px; } \ No newline at end of file diff --git a/tests/Test.AnotherWay.js b/tests/Test.AnotherWay.js index 8500f1316..9af2a400a 100644 --- a/tests/Test.AnotherWay.js +++ b/tests/Test.AnotherWay.js @@ -37,6 +37,7 @@ Test.AnotherWay._g_pages_to_run = null; // list of pages to run automatically af Test.AnotherWay._g_run_on_main_load = false; // special handling for run_pages_to_run when it might be called before onload or before list of test pages is known. Test.AnotherWay._g_run_on_list_load = false; Test.AnotherWay._g_main_loaded = false; +Test.AnotherWay._test_page_onload_delay_ms = 2000; // Number of milliseconds to wait after the iframe fired the onload event Test.AnotherWay._run_pages_to_run = function(called_from_outside){ if (!Test.AnotherWay._g_main_loaded) { diff --git a/tests/run-tests.html b/tests/run-tests.html index b2e0556ac..130d9b1db 100644 --- a/tests/run-tests.html +++ b/tests/run-tests.html @@ -92,11 +92,10 @@ + - -