From c87074c5ec5a447a08a3c5a3a972eff4648c53ed Mon Sep 17 00:00:00 2001 From: Marc Jansen Date: Thu, 27 Nov 2014 10:23:24 +0100 Subject: [PATCH 1/2] 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 @@ + - -

From e74b595659931b2cf13af447f6999036c199ade5 Mon Sep 17 00:00:00 2001 From: Marc Jansen Date: Thu, 27 Nov 2014 10:27:54 +0100 Subject: [PATCH 2/2] Remove no longer needed test-utility.js. Since the previous commit (which changed the way the test_iframe is hidden from the user), we no longer need to manually call the utility methods `showTestIframe` and `hideTestIframe`. Since these methods were the only ones contained in test-utility.js, that file is now obsolete. --- tests/container/VectorLegend.html | 4 -- tests/panel/Map.html | 74 ------------------------------- tests/selection/FeatureModel.html | 4 -- tests/slider/Zoom.html | 6 --- tests/test-utility.js | 43 ------------------ tests/window/Popup.html | 6 --- 6 files changed, 137 deletions(-) delete mode 100644 tests/test-utility.js diff --git a/tests/container/VectorLegend.html b/tests/container/VectorLegend.html index f6219d0a6..efb3ac55c 100644 --- a/tests/container/VectorLegend.html +++ b/tests/container/VectorLegend.html @@ -4,8 +4,6 @@ - - - - - - - - diff --git a/tests/test-utility.js b/tests/test-utility.js deleted file mode 100644 index 3ac84e167..000000000 --- a/tests/test-utility.js +++ /dev/null @@ -1,43 +0,0 @@ -/** - * This script will export two methods to show and hide the in the - * testsuites run-tests.html which contains the