diff options
Diffstat (limited to 'testing')
30 files changed, 104 insertions, 36 deletions
diff --git a/testing/marionette/assert.js b/testing/marionette/assert.js index d1a55bd7c..b2d228d0e 100644 --- a/testing/marionette/assert.js +++ b/testing/marionette/assert.js @@ -15,7 +15,7 @@ Cu.import("chrome://marionette/content/error.js"); this.EXPORTED_SYMBOLS = ["assert"]; const isFennec = () => AppConstants.platform == "android"; -const isB2G = () => AppConstants.MOZ_B2G; +const isB2G = () => false; const isFirefox = () => Services.appinfo.name == "Firefox"; /** Shorthands for common assertions made in Marionette. */ diff --git a/testing/marionette/harness/marionette_harness/tests/webapi-tests.ini b/testing/marionette/harness/marionette_harness/tests/webapi-tests.ini index 2c9dd1dce..5c94220af 100644 --- a/testing/marionette/harness/marionette_harness/tests/webapi-tests.ini +++ b/testing/marionette/harness/marionette_harness/tests/webapi-tests.ini @@ -1,8 +1,5 @@ -[include:../../../../../dom/system/gonk/tests/marionette/manifest.ini] [include:../../../../../dom/system/tests/marionette/manifest.ini] skip-if = android_version > '15' # Bug 1203072 [include:../../../../../dom/events/test/marionette/manifest.ini] -[include:../../../../../dom/wifi/test/marionette/manifest.ini] -[include:../../../../../dom/tethering/tests/marionette/manifest.ini] skip-if = android_version > '15' # Bug 1203075 [include:../../../../../dom/network/tests/marionette/manifest.ini] diff --git a/testing/mochitest/runtests.py b/testing/mochitest/runtests.py index 7d0c89a99..dd5439bd1 100644 --- a/testing/mochitest/runtests.py +++ b/testing/mochitest/runtests.py @@ -2024,9 +2024,8 @@ toolbar#nav-bar { # install specialpowers and mochikit as temporary addons addons = Addons(self.marionette) - if mozinfo.info.get('toolkit') != 'gonk': - addons.install(os.path.join(here, 'extensions', 'specialpowers'), temp=True) - addons.install(self.mochijar, temp=True) + addons.install(os.path.join(here, 'extensions', 'specialpowers'), temp=True) + addons.install(self.mochijar, temp=True) self.execute_start_script() diff --git a/testing/modules/tests/xpcshell/xpcshell.ini b/testing/modules/tests/xpcshell/xpcshell.ini index 40dc9920e..7ff4e27e3 100644 --- a/testing/modules/tests/xpcshell/xpcshell.ini +++ b/testing/modules/tests/xpcshell/xpcshell.ini @@ -1,7 +1,7 @@ [DEFAULT] head = tail = -skip-if = toolkit == 'android' || toolkit == 'gonk' +skip-if = toolkit == 'android' [test_assert.js] [test_mockRegistrar.js] diff --git a/testing/mozbase/mozrunner/mozrunner/utils.py b/testing/mozbase/mozrunner/mozrunner/utils.py index 79f26b8f2..c26055f30 100755 --- a/testing/mozbase/mozrunner/mozrunner/utils.py +++ b/testing/mozbase/mozrunner/mozrunner/utils.py @@ -101,10 +101,7 @@ def test_environment(xrePath, env=None, crashreporter=True, debugger=False, envVar = None dmdLibrary = None preloadEnvVar = None - if 'toolkit' in mozinfo.info and mozinfo.info['toolkit'] == "gonk": - # Skip all of this, it's only valid for the host. - pass - elif mozinfo.isUnix: + if mozinfo.isUnix: envVar = "LD_LIBRARY_PATH" env['MOZILLA_FIVE_HOME'] = xrePath dmdLibrary = "libdmd.so" diff --git a/testing/profiles/prefs_general.js b/testing/profiles/prefs_general.js index ac2c1e077..d30ae89f5 100644 --- a/testing/profiles/prefs_general.js +++ b/testing/profiles/prefs_general.js @@ -182,6 +182,9 @@ user_pref("layout.css.prefixes.device-pixel-ratio-webkit", true); // Enable CSS shape-outside for testing user_pref("layout.css.shape-outside.enabled", true); +// Enable CSS text-justify for testing +user_pref("layout.css.text-justify.enabled", true); + // Disable spammy layout warnings because they pollute test logs user_pref("layout.spammy_warnings.enabled", false); diff --git a/testing/specialpowers/content/specialpowersAPI.js b/testing/specialpowers/content/specialpowersAPI.js index 8f1ff7465..e97ad89c4 100644 --- a/testing/specialpowers/content/specialpowersAPI.js +++ b/testing/specialpowers/content/specialpowersAPI.js @@ -1529,11 +1529,7 @@ SpecialPowersAPI.prototype = { }, get isB2G() { -#ifdef MOZ_B2G - return true; -#else return false; -#endif }, addSystemEventListener: function(target, type, listener, useCapture) { diff --git a/testing/talos/talos/test.py b/testing/talos/talos/test.py index 0de9f19bb..dc1306b8e 100644 --- a/testing/talos/talos/test.py +++ b/testing/talos/talos/test.py @@ -194,6 +194,7 @@ class tpaint(TsBase): tpmozafterpaint = True filters = filter.ignore_first.prepare(5) + filter.median.prepare() unit = 'ms' + preferences = {'security.data_uri.block_toplevel_data_uri_navigations': False} @register_test() diff --git a/testing/testsuite-targets.mk b/testing/testsuite-targets.mk index 8b1d7d50d..ebe0d06cf 100644 --- a/testing/testsuite-targets.mk +++ b/testing/testsuite-targets.mk @@ -18,10 +18,6 @@ ifneq (1_WINNT,$(MOZ_PGO)_$(OS_ARCH)) BUILD_GTEST=1 endif -ifdef MOZ_B2G -BUILD_GTEST= -endif - ifndef MOZ_PHOENIX BUILD_GTEST= endif diff --git a/testing/web-platform/meta/MANIFEST.json b/testing/web-platform/meta/MANIFEST.json index 3c7df67fa..496f8e3cb 100644 --- a/testing/web-platform/meta/MANIFEST.json +++ b/testing/web-platform/meta/MANIFEST.json @@ -31100,6 +31100,10 @@ "url": "/user-timing/test_user_timing_mark.html" }, { + "path": "user-timing/test_user_timing_mark_and_measure_exception_when_invoke_with_timing_attributes.html", + "url": "/user-timing/test_user_timing_mark_and_measure_exception_when_invoke_with_timing_attributes.html" + }, + { "path": "user-timing/test_user_timing_mark_and_measure_exception_when_invoke_without_parameter.html", "url": "/user-timing/test_user_timing_mark_and_measure_exception_when_invoke_without_parameter.html" }, diff --git a/testing/web-platform/meta/mixed-content/blockable/no-opt-in/cross-origin-http/iframe-tag/top-level/keep-scheme-redirect/no-opt-in-blocks.https.html.ini b/testing/web-platform/meta/mixed-content/blockable/no-opt-in/cross-origin-http/iframe-tag/top-level/keep-scheme-redirect/no-opt-in-blocks.https.html.ini new file mode 100644 index 000000000..c65b27a08 --- /dev/null +++ b/testing/web-platform/meta/mixed-content/blockable/no-opt-in/cross-origin-http/iframe-tag/top-level/keep-scheme-redirect/no-opt-in-blocks.https.html.ini @@ -0,0 +1,3 @@ +[no-opt-in-blocks.https.html] + type: testharness + prefs: [security.mixed_content.send_hsts_priming:false, security.mixed_content.use_hsts:false] diff --git a/testing/web-platform/meta/mixed-content/blockable/no-opt-in/cross-origin-http/iframe-tag/top-level/no-redirect/no-opt-in-blocks.https.html.ini b/testing/web-platform/meta/mixed-content/blockable/no-opt-in/cross-origin-http/iframe-tag/top-level/no-redirect/no-opt-in-blocks.https.html.ini new file mode 100644 index 000000000..c65b27a08 --- /dev/null +++ b/testing/web-platform/meta/mixed-content/blockable/no-opt-in/cross-origin-http/iframe-tag/top-level/no-redirect/no-opt-in-blocks.https.html.ini @@ -0,0 +1,3 @@ +[no-opt-in-blocks.https.html] + type: testharness + prefs: [security.mixed_content.send_hsts_priming:false, security.mixed_content.use_hsts:false] diff --git a/testing/web-platform/meta/mixed-content/blockable/no-opt-in/cross-origin-http/iframe-tag/top-level/swap-scheme-redirect/no-opt-in-blocks.https.html.ini b/testing/web-platform/meta/mixed-content/blockable/no-opt-in/cross-origin-http/iframe-tag/top-level/swap-scheme-redirect/no-opt-in-blocks.https.html.ini new file mode 100644 index 000000000..c65b27a08 --- /dev/null +++ b/testing/web-platform/meta/mixed-content/blockable/no-opt-in/cross-origin-http/iframe-tag/top-level/swap-scheme-redirect/no-opt-in-blocks.https.html.ini @@ -0,0 +1,3 @@ +[no-opt-in-blocks.https.html] + type: testharness + prefs: [security.mixed_content.send_hsts_priming:false, security.mixed_content.use_hsts:false] diff --git a/testing/web-platform/meta/mixed-content/blockable/no-opt-in/same-host-http/iframe-tag/top-level/keep-scheme-redirect/no-opt-in-blocks.https.html.ini b/testing/web-platform/meta/mixed-content/blockable/no-opt-in/same-host-http/iframe-tag/top-level/keep-scheme-redirect/no-opt-in-blocks.https.html.ini new file mode 100644 index 000000000..c65b27a08 --- /dev/null +++ b/testing/web-platform/meta/mixed-content/blockable/no-opt-in/same-host-http/iframe-tag/top-level/keep-scheme-redirect/no-opt-in-blocks.https.html.ini @@ -0,0 +1,3 @@ +[no-opt-in-blocks.https.html] + type: testharness + prefs: [security.mixed_content.send_hsts_priming:false, security.mixed_content.use_hsts:false] diff --git a/testing/web-platform/meta/mixed-content/blockable/no-opt-in/same-host-http/iframe-tag/top-level/no-redirect/no-opt-in-blocks.https.html.ini b/testing/web-platform/meta/mixed-content/blockable/no-opt-in/same-host-http/iframe-tag/top-level/no-redirect/no-opt-in-blocks.https.html.ini new file mode 100644 index 000000000..c65b27a08 --- /dev/null +++ b/testing/web-platform/meta/mixed-content/blockable/no-opt-in/same-host-http/iframe-tag/top-level/no-redirect/no-opt-in-blocks.https.html.ini @@ -0,0 +1,3 @@ +[no-opt-in-blocks.https.html] + type: testharness + prefs: [security.mixed_content.send_hsts_priming:false, security.mixed_content.use_hsts:false] diff --git a/testing/web-platform/meta/mixed-content/blockable/no-opt-in/same-host-http/iframe-tag/top-level/swap-scheme-redirect/no-opt-in-blocks.https.html.ini b/testing/web-platform/meta/mixed-content/blockable/no-opt-in/same-host-http/iframe-tag/top-level/swap-scheme-redirect/no-opt-in-blocks.https.html.ini new file mode 100644 index 000000000..c65b27a08 --- /dev/null +++ b/testing/web-platform/meta/mixed-content/blockable/no-opt-in/same-host-http/iframe-tag/top-level/swap-scheme-redirect/no-opt-in-blocks.https.html.ini @@ -0,0 +1,3 @@ +[no-opt-in-blocks.https.html] + type: testharness + prefs: [security.mixed_content.send_hsts_priming:false, security.mixed_content.use_hsts:false] diff --git a/testing/web-platform/meta/service-workers/service-worker/resource-timing.https.html.ini b/testing/web-platform/meta/service-workers/service-worker/resource-timing.https.html.ini index b399d5f38..b6f02262b 100644 --- a/testing/web-platform/meta/service-workers/service-worker/resource-timing.https.html.ini +++ b/testing/web-platform/meta/service-workers/service-worker/resource-timing.https.html.ini @@ -1,9 +1,2 @@ [resource-timing.https.html] type: testharness - disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1178713 - [Controlled resource loads] - expected: FAIL - - [Non-controlled resource loads] - expected: FAIL - diff --git a/testing/web-platform/tests/service-workers/service-worker/fetch-frame-resource.https.html b/testing/web-platform/tests/service-workers/service-worker/fetch-frame-resource.https.html index cc1dac472..fd7419832 100644 --- a/testing/web-platform/tests/service-workers/service-worker/fetch-frame-resource.https.html +++ b/testing/web-platform/tests/service-workers/service-worker/fetch-frame-resource.https.html @@ -110,7 +110,8 @@ async_test(function(t) { frame.src = scope + '?mode=cors&url=' + encodeURIComponent(host_info['HTTPS_REMOTE_ORIGIN'] + path + - '?ACAOrigin=' + host_info['HTTPS_ORIGIN']); + '?ACAOrigin=' + host_info['HTTPS_ORIGIN'] + + '&ACACredentials=true'); document.body.appendChild(frame); return getLoadedFrameAsObject(frame); }) @@ -183,7 +184,8 @@ async_test(function(t) { var win = window.open( scope + '?mode=cors&url=' + encodeURIComponent(host_info['HTTPS_REMOTE_ORIGIN'] + path + - '?ACAOrigin=' + host_info['HTTPS_ORIGIN'])); + '?ACAOrigin=' + host_info['HTTPS_ORIGIN'] + + '&ACACredentials=true')); return getLoadedWindowAsObject(win); }) .then(function(result) { diff --git a/testing/web-platform/tests/service-workers/service-worker/resource-timing.https.html b/testing/web-platform/tests/service-workers/service-worker/resource-timing.https.html index f33c41d71..3a1adfa48 100644 --- a/testing/web-platform/tests/service-workers/service-worker/resource-timing.https.html +++ b/testing/web-platform/tests/service-workers/service-worker/resource-timing.https.html @@ -13,6 +13,10 @@ function verify(performance, resource, description) { assert_greater_than(entry.workerStart, 0, description); assert_greater_than_equal(entry.workerStart, entry.startTime, description); assert_less_than_equal(entry.workerStart, entry.fetchStart, description); + assert_greater_than_equal(entry.responseStart, entry.fetchStart, description); + assert_greater_than_equal(entry.responseEnd, entry.responseStart, description); + assert_greater_than(entry.responseEnd, entry.fetchStart, description); + assert_greater_than(entry.duration, 0, description); if (resource.indexOf('redirect.py') != -1) { assert_less_than_equal(entry.workerStart, entry.redirectStart, description); diff --git a/testing/web-platform/tests/service-workers/service-worker/resources/resource-timing-worker.js b/testing/web-platform/tests/service-workers/service-worker/resources/resource-timing-worker.js index 481a6536a..452876838 100644 --- a/testing/web-platform/tests/service-workers/service-worker/resources/resource-timing-worker.js +++ b/testing/web-platform/tests/service-workers/service-worker/resources/resource-timing-worker.js @@ -1,5 +1,9 @@ self.addEventListener('fetch', function(event) { if (event.request.url.indexOf('dummy.js') != -1) { - event.respondWith(new Response()); + event.respondWith(new Promise(resolve => { + // Slightly delay the response so we ensure we get a non-zero + // duration. + setTimeout(_ => resolve(new Response()), 100); + })); } }); diff --git a/testing/web-platform/tests/user-timing/resources/webperftestharness.js b/testing/web-platform/tests/user-timing/resources/webperftestharness.js index 750946dde..f1597bbe7 100644 --- a/testing/web-platform/tests/user-timing/resources/webperftestharness.js +++ b/testing/web-platform/tests/user-timing/resources/webperftestharness.js @@ -12,7 +12,7 @@ policies and contribution forms [3]. // Helper Functions for NavigationTiming W3C tests // -var performanceNamespace = window.performance; +var performanceNamespace = self.performance; var timingAttributes = [ 'connectEnd', 'connectStart', diff --git a/testing/web-platform/tests/user-timing/test_user_timing_mark_and_measure_exception_when_invoke_with_timing_attributes.html b/testing/web-platform/tests/user-timing/test_user_timing_mark_and_measure_exception_when_invoke_with_timing_attributes.html new file mode 100644 index 000000000..aea8cb6e9 --- /dev/null +++ b/testing/web-platform/tests/user-timing/test_user_timing_mark_and_measure_exception_when_invoke_with_timing_attributes.html @@ -0,0 +1,32 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8" /> + <title>exception test of performance.mark and performance.measure</title> + <meta rel="help" href="http://www.w3.org/TR/user-timing/#extensions-performance-interface"/> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="resources/webperftestharness.js"></script> + </head> + <body> + <script> + setup({explicit_done: true}); + test_namespace(); + + test(function() { + for (var i in timingAttributes) { + assert_throws("SyntaxError", function() { window.performance.mark(timingAttributes[i]); }); + assert_throws("SyntaxError", function() { window.performance.measure(timingAttributes[i]); }); + } + }, "performance.mark and performance.measure should throw if used with timing attribute values"); + + fetch_tests_from_worker(new Worker("test_user_timing_mark_and_measure_exception_when_invoke_with_timing_attributes.js")); + + done(); + + </script> + <h1>Description</h1> + <p>This test validates exception scenarios of invoking mark() and measure() with timing attributes as value.</p> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/user-timing/test_user_timing_mark_and_measure_exception_when_invoke_with_timing_attributes.js b/testing/web-platform/tests/user-timing/test_user_timing_mark_and_measure_exception_when_invoke_with_timing_attributes.js new file mode 100644 index 000000000..f015402f9 --- /dev/null +++ b/testing/web-platform/tests/user-timing/test_user_timing_mark_and_measure_exception_when_invoke_with_timing_attributes.js @@ -0,0 +1,14 @@ +importScripts("/resources/testharness.js"); +importScripts("resources/webperftestharness.js"); + +test(function() { + for (var i in timingAttributes) { + performance.mark(timingAttributes[i]); + performance.clearMarks(timingAttributes[i]); + + performance.measure(timingAttributes[i]); + performance.clearMeasures(timingAttributes[i]); + } +}, "performance.mark and performance.measure should not throw if used with timing attribute values in workers"); + +done(); diff --git a/testing/web-platform/tests/websockets/unload-a-document/001-1.html b/testing/web-platform/tests/websockets/unload-a-document/001-1.html index 214246b2e..926a68a06 100644 --- a/testing/web-platform/tests/websockets/unload-a-document/001-1.html +++ b/testing/web-platform/tests/websockets/unload-a-document/001-1.html @@ -22,7 +22,7 @@ t.step(function() { }), 1000); controller.navigate(); }) - ws.onerror = ws.onmessage = ws.onclose = t.step_func(function(e) {assert_unreached("Got unexpected event " + e.type)}); + ws.onerror = ws.onmessage = t.step_func(e => assert_unreached("Got unexpected event " + e.type)); } }); </script> diff --git a/testing/web-platform/tests/websockets/unload-a-document/001-2.html b/testing/web-platform/tests/websockets/unload-a-document/001-2.html new file mode 100644 index 000000000..24c419ce1 --- /dev/null +++ b/testing/web-platform/tests/websockets/unload-a-document/001-2.html @@ -0,0 +1,4 @@ +<!doctype html> +<title>WebSockets: navigating top-level browsing context</title> +<body onload="history.back()"></body> +</html> diff --git a/testing/web-platform/tests/websockets/unload-a-document/001.html b/testing/web-platform/tests/websockets/unload-a-document/001.html index d949b6eba..56e883c64 100644 --- a/testing/web-platform/tests/websockets/unload-a-document/001.html +++ b/testing/web-platform/tests/websockets/unload-a-document/001.html @@ -20,6 +20,6 @@ t.step(function() { }); }); navigate = t.step_func(function() { - w.location = 'data:text/html,<body onload="history.back()">'; + w.location = w.location.href.replace("001-1.html", "001-2.html"); }); </script> diff --git a/testing/web-platform/tests/websockets/unload-a-document/002-1.html b/testing/web-platform/tests/websockets/unload-a-document/002-1.html index 86a852b10..52f188fa4 100644 --- a/testing/web-platform/tests/websockets/unload-a-document/002-1.html +++ b/testing/web-platform/tests/websockets/unload-a-document/002-1.html @@ -28,7 +28,7 @@ t.step(function() { controller.navigate(); }); }) - ws.onerror = ws.onmessage = ws.onclose = t.step_func(function(e) {assert_unreached("Got unexpected event " + e.type)}); + ws.onerror = ws.onmessage = t.step_func(e => assert_unreached("Got unexpected event " + e.type)); } }); </script> diff --git a/testing/web-platform/tests/websockets/unload-a-document/002-2.html b/testing/web-platform/tests/websockets/unload-a-document/002-2.html new file mode 100644 index 000000000..9a246a1dd --- /dev/null +++ b/testing/web-platform/tests/websockets/unload-a-document/002-2.html @@ -0,0 +1,4 @@ +<!doctype html> +<title>WebSockets: navigating top-level browsing context with closed websocket</title> +<body onload="history.back()"></body> +</html> diff --git a/testing/web-platform/tests/websockets/unload-a-document/002.html b/testing/web-platform/tests/websockets/unload-a-document/002.html index df35192d6..03764c345 100644 --- a/testing/web-platform/tests/websockets/unload-a-document/002.html +++ b/testing/web-platform/tests/websockets/unload-a-document/002.html @@ -21,6 +21,6 @@ t.step(function() { }); }); navigate = t.step_func(function() { - w.location = 'data:text/html,<body onload="history.back()">'; + w.location = w.location.href.replace("002-1.html", "002-2.html"); }); </script> diff --git a/testing/xpcshell/example/unit/xpcshell.ini b/testing/xpcshell/example/unit/xpcshell.ini index 3af6770af..dde767225 100644 --- a/testing/xpcshell/example/unit/xpcshell.ini +++ b/testing/xpcshell/example/unit/xpcshell.ini @@ -5,7 +5,7 @@ [DEFAULT] head = tail = -skip-if = toolkit == 'gonk' +skip-if = support-files = subdir/file.txt file.txt |