diff options
Diffstat (limited to 'testing')
15 files changed, 85 insertions, 11 deletions
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/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(); |