summaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
Diffstat (limited to 'testing')
-rw-r--r--testing/gtest/mozilla/GTestRunner.cpp25
-rw-r--r--testing/gtest/rungtests.py1
-rw-r--r--testing/marionette/client/marionette_driver/geckoinstance.py3
-rw-r--r--testing/marionette/element.js16
-rw-r--r--testing/marionette/error.js21
-rw-r--r--testing/marionette/harness/marionette_harness/tests/unit/test_click.py17
-rw-r--r--testing/marionette/interaction.js50
-rw-r--r--testing/marionette/listener.js4
-rw-r--r--testing/marionette/test_error.js20
-rw-r--r--testing/mochitest/BrowserTestUtils/BrowserTestUtils.jsm9
-rw-r--r--testing/mozbase/mozrunner/mozrunner/base/browser.py1
-rw-r--r--testing/mozbase/mozrunner/mozrunner/base/device.py3
-rwxr-xr-xtesting/mozbase/mozrunner/mozrunner/utils.py1
-rw-r--r--testing/profiles/prefs_general.js1
-rwxr-xr-xtesting/runcppunittests.py1
-rw-r--r--testing/talos/talos/ffsetup.py5
-rw-r--r--testing/web-platform/meta/MANIFEST.json22
-rw-r--r--testing/web-platform/meta/XMLHttpRequest/open-url-bogus.htm.ini11
-rw-r--r--testing/web-platform/meta/dom/events/EventTarget-dispatchEvent.html.ini4
-rw-r--r--testing/web-platform/meta/dom/nodes/Document-createEvent.html.ini24
-rw-r--r--testing/web-platform/meta/fetch/api/headers/headers-basic.html.ini14
-rw-r--r--testing/web-platform/meta/fetch/nosniff/worker.html.ini3
-rw-r--r--testing/web-platform/meta/html/semantics/forms/constraints/form-validation-checkValidity.html.ini22
-rw-r--r--testing/web-platform/meta/html/semantics/forms/constraints/form-validation-reportValidity.html.ini21
-rw-r--r--testing/web-platform/meta/html/semantics/forms/constraints/form-validation-validity-rangeOverflow.html.ini18
-rw-r--r--testing/web-platform/meta/html/semantics/forms/constraints/form-validation-validity-rangeUnderflow.html.ini18
-rw-r--r--testing/web-platform/meta/html/semantics/forms/constraints/form-validation-validity-stepMismatch.html.ini4
-rw-r--r--testing/web-platform/meta/html/semantics/forms/constraints/form-validation-validity-valid.html.ini13
-rw-r--r--testing/web-platform/meta/html/semantics/selectors/pseudo-classes/inrange-outofrange.html.ini20
-rw-r--r--testing/web-platform/meta/selection/getSelection.html.ini9
-rw-r--r--testing/web-platform/meta/service-workers/service-worker/resource-timing.https.html.ini7
-rw-r--r--testing/web-platform/meta/url/url-constructor.html.ini3
-rw-r--r--testing/web-platform/tests/2dcontext/drawing-images-to-the-canvas/drawimage_svg_image_1.html (renamed from testing/web-platform/tests/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_1.html)6
-rw-r--r--testing/web-platform/tests/2dcontext/drawing-images-to-the-canvas/drawimage_svg_image_1_ref.html (renamed from testing/web-platform/tests/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_1_ref.html)0
-rw-r--r--testing/web-platform/tests/fetch/api/response/response-init-002.html5
-rw-r--r--testing/web-platform/tests/fetch/nosniff/script.html4
-rw-r--r--testing/web-platform/tests/html/webappapis/idle-callbacks/callback-suspended.html93
-rw-r--r--testing/web-platform/tests/html/webappapis/idle-callbacks/callback-timeout.html15
-rw-r--r--testing/web-platform/tests/html/webappapis/idle-callbacks/cancel-invoked.html6
-rw-r--r--testing/web-platform/tests/html/webappapis/idle-callbacks/resources/post_name_on_load.html7
-rw-r--r--testing/web-platform/tests/service-workers/service-worker/resource-timing.https.html4
-rw-r--r--testing/web-platform/tests/service-workers/service-worker/resources/resource-timing-worker.js6
-rw-r--r--testing/web-platform/tests/user-timing/resources/webperftestharness.js2
-rw-r--r--testing/web-platform/tests/user-timing/test_user_timing_mark_and_measure_exception_when_invoke_with_timing_attributes.html32
-rw-r--r--testing/web-platform/tests/user-timing/test_user_timing_mark_and_measure_exception_when_invoke_with_timing_attributes.js14
-rw-r--r--testing/web-platform/tests/workers/Worker_cross_origin_security_err.htm2
-rw-r--r--testing/web-platform/tests/workers/constructors/SharedWorker/same-origin.html2
-rw-r--r--testing/web-platform/tests/workers/constructors/Worker/same-origin.html2
-rw-r--r--testing/xpcshell/head.js17
-rwxr-xr-xtesting/xpcshell/runxpcshelltests.py3
50 files changed, 334 insertions, 277 deletions
diff --git a/testing/gtest/mozilla/GTestRunner.cpp b/testing/gtest/mozilla/GTestRunner.cpp
index 0864db8cb..544de81da 100644
--- a/testing/gtest/mozilla/GTestRunner.cpp
+++ b/testing/gtest/mozilla/GTestRunner.cpp
@@ -6,9 +6,6 @@
#include "GTestRunner.h"
#include "gtest/gtest.h"
#include "mozilla/Attributes.h"
-#ifdef MOZ_CRASHREPORTER
-#include "nsICrashReporter.h"
-#endif
#include "testing/TestHarness.h"
#include "prenv.h"
#ifdef XP_WIN
@@ -92,28 +89,6 @@ int RunGTestFunc()
#ifdef XP_WIN
mozilla::ipc::windows::InitUIThread();
#endif
-#ifdef MOZ_CRASHREPORTER
- nsCOMPtr<nsICrashReporter> crashreporter;
- char *crashreporterStr = PR_GetEnv("MOZ_CRASHREPORTER");
- if (crashreporterStr && !strcmp(crashreporterStr, "1")) {
- //TODO: move this to an even-more-common location to use in all
- // C++ unittests
- crashreporter = do_GetService("@mozilla.org/toolkit/crash-reporter;1");
- if (crashreporter) {
- std::cerr << "Setting up crash reporting" << std::endl;
-
- nsCOMPtr<nsIProperties> dirsvc =
- do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID);
- nsCOMPtr<nsIFile> cwd;
- nsresult rv = dirsvc->Get(NS_OS_CURRENT_WORKING_DIR,
- NS_GET_IID(nsIFile),
- getter_AddRefs(cwd));
- MOZ_RELEASE_ASSERT(NS_SUCCEEDED(rv));
- crashreporter->SetEnabled(true);
- crashreporter->SetMinidumpPath(cwd);
- }
- }
-#endif
return RUN_ALL_TESTS();
}
diff --git a/testing/gtest/rungtests.py b/testing/gtest/rungtests.py
index e9e33cca2..499908680 100644
--- a/testing/gtest/rungtests.py
+++ b/testing/gtest/rungtests.py
@@ -89,7 +89,6 @@ class GTests(object):
)
env["XPCOM_DEBUG_BREAK"] = "stack-and-abort"
env["MOZ_CRASHREPORTER_NO_REPORT"] = "1"
- env["MOZ_CRASHREPORTER"] = "1"
env["MOZ_RUN_GTEST"] = "1"
# Normally we run with GTest default output, override this to use the TBPL test format.
env["MOZ_TBPL_PARSER"] = "1"
diff --git a/testing/marionette/client/marionette_driver/geckoinstance.py b/testing/marionette/client/marionette_driver/geckoinstance.py
index 7e2048187..174168ed2 100644
--- a/testing/marionette/client/marionette_driver/geckoinstance.py
+++ b/testing/marionette/client/marionette_driver/geckoinstance.py
@@ -226,8 +226,7 @@ class GeckoInstance(object):
# environment variables needed for crashreporting
# https://developer.mozilla.org/docs/Environment_variables_affecting_crash_reporting
- env.update({"MOZ_CRASHREPORTER": "1",
- "MOZ_CRASHREPORTER_NO_REPORT": "1",
+ env.update({"MOZ_CRASHREPORTER_NO_REPORT": "1",
"MOZ_CRASHREPORTER_SHUTDOWN": "1",
})
diff --git a/testing/marionette/element.js b/testing/marionette/element.js
index 8e66ee6df..9687fb27d 100644
--- a/testing/marionette/element.js
+++ b/testing/marionette/element.js
@@ -953,6 +953,12 @@ element.getContainer = function (el) {
* pointer-interactable, if it is found somewhere in the
* |elementsFromPoint| list at |el|'s in-view centre coordinates.
*
+ * Before running the check, we change |el|'s pointerEvents style property
+ * to "auto", since elements without pointer events enabled do not turn
+ * up in the paint tree we get from document.elementsFromPoint. This is
+ * a specialisation that is only relevant when checking if the element is
+ * in view.
+ *
* @param {Element} el
* Element to check if is in view.
*
@@ -960,8 +966,14 @@ element.getContainer = function (el) {
* True if |el| is inside the viewport, or false otherwise.
*/
element.isInView = function (el) {
- let tree = element.getPointerInteractablePaintTree(el);
- return tree.includes(el);
+ let originalPointerEvents = el.style.pointerEvents;
+ try {
+ el.style.pointerEvents = "auto";
+ const tree = element.getPointerInteractablePaintTree(el);
+ return tree.includes(el);
+ } finally {
+ el.style.pointerEvents = originalPointerEvents;
+ }
};
/**
diff --git a/testing/marionette/error.js b/testing/marionette/error.js
index 97cc3fb25..c36dace25 100644
--- a/testing/marionette/error.js
+++ b/testing/marionette/error.js
@@ -260,10 +260,23 @@ class ElementClickInterceptedError extends WebDriverError {
if (obscuredEl && coords) {
const doc = obscuredEl.ownerDocument;
const overlayingEl = doc.elementFromPoint(coords.x, coords.y);
- msg = error.pprint`Element ${obscuredEl} is not clickable ` +
- `at point (${coords.x},${coords.y}) ` +
- error.pprint`because another element ${overlayingEl} ` +
- `obscures it`;
+
+ switch (obscuredEl.style.pointerEvents) {
+ case "none":
+ msg = error.pprint`Element ${obscuredEl} is not clickable ` +
+ `at point (${coords.x},${coords.y}) ` +
+ `because it does not have pointer events enabled, ` +
+ error.pprint`and element ${overlayingEl} ` +
+ `would receive the click instead`;
+ break;
+
+ default:
+ msg = error.pprint`Element ${obscuredEl} is not clickable ` +
+ `at point (${coords.x},${coords.y}) ` +
+ error.pprint`because another element ${overlayingEl} ` +
+ `obscures it`;
+ break;
+ }
}
super(msg);
diff --git a/testing/marionette/harness/marionette_harness/tests/unit/test_click.py b/testing/marionette/harness/marionette_harness/tests/unit/test_click.py
index d03062e85..06019834a 100644
--- a/testing/marionette/harness/marionette_harness/tests/unit/test_click.py
+++ b/testing/marionette/harness/marionette_harness/tests/unit/test_click.py
@@ -252,3 +252,20 @@ class TestClick(TestLegacyClick):
with self.assertRaises(errors.ElementClickInterceptedException):
obscured.click()
self.assertFalse(self.marionette.execute_script("return window.clicked", sandbox=None))
+
+ def test_pointer_events_none(self):
+ self.marionette.navigate(inline("""
+ <button style="pointer-events: none">click me</button>
+ <script>
+ window.clicked = false;
+ let button = document.querySelector("button");
+ button.addEventListener("click", () => window.clicked = true);
+ </script>
+ """))
+ button = self.marionette.find_element(By.TAG_NAME, "button")
+ self.assertEqual("none", button.value_of_css_property("pointer-events"))
+
+ with self.assertRaisesRegexp(errors.ElementClickInterceptedException,
+ "does not have pointer events enabled"):
+ button.click()
+ self.assertFalse(self.marionette.execute_script("return window.clicked", sandbox=None))
diff --git a/testing/marionette/interaction.js b/testing/marionette/interaction.js
index c8275665d..2392485d7 100644
--- a/testing/marionette/interaction.js
+++ b/testing/marionette/interaction.js
@@ -76,6 +76,30 @@ const SELECTED_PROPERTY_SUPPORTED_XUL = new Set([
"TAB",
]);
+/**
+ * Common form controls that user can change the value property interactively.
+ */
+const COMMON_FORM_CONTROLS = new Set([
+ "input",
+ "textarea",
+ "select",
+]);
+
+/**
+ * Input elements that do not fire "input" and "change" events when value
+ * property changes.
+ */
+const INPUT_TYPES_NO_EVENT = new Set([
+ "checkbox",
+ "radio",
+ "file",
+ "hidden",
+ "image",
+ "reset",
+ "button",
+ "submit",
+]);
+
this.interaction = {};
/**
@@ -339,6 +363,32 @@ interaction.uploadFile = function (el, path) {
};
/**
+ * Sets a form element's value.
+ *
+ * @param {DOMElement} el
+ * An form element, e.g. input, textarea, etc.
+ * @param {string} value
+ * The value to be set.
+ *
+ * @throws TypeError
+ * If |el| is not an supported form element.
+ */
+interaction.setFormControlValue = function* (el, value) {
+ if (!COMMON_FORM_CONTROLS.has(el.localName)) {
+ throw new TypeError("This function is for form elements only");
+ }
+
+ el.value = value;
+
+ if (INPUT_TYPES_NO_EVENT.has(el.type)) {
+ return;
+ }
+
+ event.input(el);
+ event.change(el);
+};
+
+/**
* Send keys to element.
*
* @param {DOMElement|XULElement} el
diff --git a/testing/marionette/listener.js b/testing/marionette/listener.js
index b64eb378d..619ac249d 100644
--- a/testing/marionette/listener.js
+++ b/testing/marionette/listener.js
@@ -30,6 +30,7 @@ Cu.import("chrome://marionette/content/session.js");
Cu.import("chrome://marionette/content/simpletest.js");
Cu.import("resource://gre/modules/FileUtils.jsm");
+Cu.import("resource://gre/modules/Preferences.jsm");
Cu.import("resource://gre/modules/Task.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
@@ -1465,6 +1466,9 @@ function* sendKeysToElement(id, val) {
if (el.type == "file") {
let path = val.join("");
yield interaction.uploadFile(el, path);
+ } else if ((el.type == "date" || el.type == "time") &&
+ Preferences.get("dom.forms.datetime")) {
+ yield interaction.setFormControlValue(el, val);
} else {
yield interaction.sendKeysToElement(
el, val, false, capabilities.get("moz:accessibilityChecks"));
diff --git a/testing/marionette/test_error.js b/testing/marionette/test_error.js
index f27212637..a905f02f0 100644
--- a/testing/marionette/test_error.js
+++ b/testing/marionette/test_error.js
@@ -209,15 +209,25 @@ add_test(function test_ElementClickInterceptedError() {
return otherEl;
},
},
+ style: {
+ pointerEvents: "auto",
+ }
};
- let err = new ElementClickInterceptedError(obscuredEl, {x: 1, y: 2});
- equal("ElementClickInterceptedError", err.name);
+ let err1 = new ElementClickInterceptedError(obscuredEl, {x: 1, y: 2});
+ equal("ElementClickInterceptedError", err1.name);
equal("Element <b> is not clickable at point (1,2) " +
"because another element <a> obscures it",
- err.message);
- equal("element click intercepted", err.status);
- ok(err instanceof WebDriverError);
+ err1.message);
+ equal("element click intercepted", err1.status);
+ ok(err1 instanceof WebDriverError);
+
+ obscuredEl.style.pointerEvents = "none";
+ let err2 = new ElementClickInterceptedError(obscuredEl, {x: 1, y: 2});
+ equal("Element <b> is not clickable at point (1,2) " +
+ "because it does not have pointer events enabled, " +
+ "and element <a> would receive the click instead",
+ err2.message);
run_next_test();
});
diff --git a/testing/mochitest/BrowserTestUtils/BrowserTestUtils.jsm b/testing/mochitest/BrowserTestUtils/BrowserTestUtils.jsm
index eebcbb6bb..d6cd836e7 100644
--- a/testing/mochitest/BrowserTestUtils/BrowserTestUtils.jsm
+++ b/testing/mochitest/BrowserTestUtils/BrowserTestUtils.jsm
@@ -851,9 +851,6 @@ this.BrowserTestUtils = {
crashBrowser: Task.async(function*(browser, shouldShowTabCrashPage=true) {
let extra = {};
let KeyValueParser = {};
- if (AppConstants.MOZ_CRASHREPORTER) {
- Cu.import("resource://gre/modules/KeyValueParser.jsm", KeyValueParser);
- }
if (!browser.isRemoteBrowser) {
throw new Error("<xul:browser> needs to be remote in order to crash");
@@ -938,11 +935,7 @@ this.BrowserTestUtils = {
extrafile.append(dumpID + '.extra');
if (extrafile.exists()) {
dump(`\nNo .extra file for dumpID: ${dumpID}\n`);
- if (AppConstants.MOZ_CRASHREPORTER) {
- extra = KeyValueParser.parseKeyValuePairsFromFile(extrafile);
- } else {
- dump('\nCrashReporter not enabled - will not return any extra data\n');
- }
+ dump('\nWill not return any extra data\n');
}
removeFile(minidumpDirectory, dumpID + '.dmp');
diff --git a/testing/mozbase/mozrunner/mozrunner/base/browser.py b/testing/mozbase/mozrunner/mozrunner/base/browser.py
index 998e4ccc5..6fc7348d5 100644
--- a/testing/mozbase/mozrunner/mozrunner/base/browser.py
+++ b/testing/mozbase/mozrunner/mozrunner/base/browser.py
@@ -75,6 +75,5 @@ class GeckoRuntimeRunner(BaseRunner):
if not self.show_crash_reporter:
# hide the crash reporter window
self.env["MOZ_CRASHREPORTER_NO_REPORT"] = "1"
- self.env["MOZ_CRASHREPORTER"] = "1"
BaseRunner.start(self, *args, **kwargs)
diff --git a/testing/mozbase/mozrunner/mozrunner/base/device.py b/testing/mozbase/mozrunner/mozrunner/base/device.py
index 2252203d1..6eeef042f 100644
--- a/testing/mozbase/mozrunner/mozrunner/base/device.py
+++ b/testing/mozbase/mozrunner/mozrunner/base/device.py
@@ -22,8 +22,7 @@ class DeviceRunner(BaseRunner):
The base runner class used for running gecko on
remote devices (or emulators), such as B2G.
"""
- env = {'MOZ_CRASHREPORTER': '1',
- 'MOZ_CRASHREPORTER_NO_REPORT': '1',
+ env = {'MOZ_CRASHREPORTER_NO_REPORT': '1',
'MOZ_CRASHREPORTER_SHUTDOWN': '1',
'MOZ_HIDE_RESULTS_TABLE': '1',
'MOZ_LOG': 'signaling:3,mtransport:4,DataChannel:4,jsep:4,MediaPipelineFactory:4',
diff --git a/testing/mozbase/mozrunner/mozrunner/utils.py b/testing/mozbase/mozrunner/mozrunner/utils.py
index f96c94398..79f26b8f2 100755
--- a/testing/mozbase/mozrunner/mozrunner/utils.py
+++ b/testing/mozbase/mozrunner/mozrunner/utils.py
@@ -132,7 +132,6 @@ def test_environment(xrePath, env=None, crashreporter=True, debugger=False,
if crashreporter and not debugger:
env['MOZ_CRASHREPORTER_NO_REPORT'] = '1'
- env['MOZ_CRASHREPORTER'] = '1'
else:
env['MOZ_CRASHREPORTER_DISABLE'] = '1'
diff --git a/testing/profiles/prefs_general.js b/testing/profiles/prefs_general.js
index a9572b912..d30ae89f5 100644
--- a/testing/profiles/prefs_general.js
+++ b/testing/profiles/prefs_general.js
@@ -12,6 +12,7 @@ user_pref("dom.experimental_forms", true); // on for testing
user_pref("dom.forms.number", true); // on for testing
user_pref("dom.forms.color", true); // on for testing
user_pref("dom.forms.datetime", true); // on for testing
+user_pref("dom.forms.datetime.others", true); // on for testing
user_pref("dom.max_script_run_time", 0); // no slow script dialogs
user_pref("hangmonitor.timeout", 0); // no hang monitor
user_pref("dom.max_chrome_script_run_time", 0);
diff --git a/testing/runcppunittests.py b/testing/runcppunittests.py
index d8b79f68f..fdd6abc1f 100755
--- a/testing/runcppunittests.py
+++ b/testing/runcppunittests.py
@@ -90,7 +90,6 @@ class CPPUnitTests(object):
# been fixed to enable crash reporting
env["XPCOM_DEBUG_BREAK"] = "stack-and-abort"
env["MOZ_CRASHREPORTER_NO_REPORT"] = "1"
- env["MOZ_CRASHREPORTER"] = "1"
return env
def build_environment(self):
diff --git a/testing/talos/talos/ffsetup.py b/testing/talos/talos/ffsetup.py
index 22a9dea07..14ff576d5 100644
--- a/testing/talos/talos/ffsetup.py
+++ b/testing/talos/talos/ffsetup.py
@@ -67,10 +67,7 @@ class FFSetup(object):
# for winxp e10s logging:
# https://bugzilla.mozilla.org/show_bug.cgi?id=1037445
self.env['MOZ_WIN_INHERIT_STD_HANDLES_PRE_VISTA'] = '1'
- if self.browser_config['symbols_path']:
- self.env['MOZ_CRASHREPORTER'] = '1'
- else:
- self.env['MOZ_CRASHREPORTER_DISABLE'] = '1'
+ self.env['MOZ_CRASHREPORTER_DISABLE'] = '1'
self.env['MOZ_DISABLE_NONLOCAL_CONNECTIONS'] = '1'
diff --git a/testing/web-platform/meta/MANIFEST.json b/testing/web-platform/meta/MANIFEST.json
index 65626d6b8..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"
},
@@ -38674,6 +38678,12 @@
"url": "/html/webappapis/idle-callbacks/callback-multiple-calls.html"
}
],
+ "html/webappapis/idle-callbacks/callback-suspended.html": [
+ {
+ "path": "html/webappapis/idle-callbacks/callback-suspended.html",
+ "url": "/html/webappapis/idle-callbacks/callback-suspended.html"
+ }
+ ],
"html/webappapis/idle-callbacks/callback-timeout.html": [
{
"path": "html/webappapis/idle-callbacks/callback-timeout.html",
@@ -39138,6 +39148,18 @@
"url": "/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_9.html"
}
],
+ "2dcontext/drawing-images-to-the-canvas/drawimage_svg_image_1.html": [
+ {
+ "path": "2dcontext/drawing-images-to-the-canvas/drawimage_svg_image_1.html",
+ "references": [
+ [
+ "/2dcontext/drawing-images-to-the-canvas/drawimage_svg_image_1_ref.html",
+ "=="
+ ]
+ ],
+ "url": "/2dcontext/drawing-images-to-the-canvas/drawimage_svg_image_1.html"
+ }
+ ],
"2dcontext/line-styles/canvas_linestyles_linecap_001.htm": [
{
"path": "2dcontext/line-styles/canvas_linestyles_linecap_001.htm",
diff --git a/testing/web-platform/meta/XMLHttpRequest/open-url-bogus.htm.ini b/testing/web-platform/meta/XMLHttpRequest/open-url-bogus.htm.ini
deleted file mode 100644
index ef7b5d910..000000000
--- a/testing/web-platform/meta/XMLHttpRequest/open-url-bogus.htm.ini
+++ /dev/null
@@ -1,11 +0,0 @@
-[open-url-bogus.htm]
- type: testharness
- [XMLHttpRequest: open() - bogus URLs (http:)]
- expected: FAIL
-
- [XMLHttpRequest: open() - bogus URLs (ftp:)]
- expected: FAIL
-
- [XMLHttpRequest: open() - bogus URLs (http:////////////)]
- expected: FAIL
-
diff --git a/testing/web-platform/meta/dom/events/EventTarget-dispatchEvent.html.ini b/testing/web-platform/meta/dom/events/EventTarget-dispatchEvent.html.ini
index d62b521c5..0d489b03d 100644
--- a/testing/web-platform/meta/dom/events/EventTarget-dispatchEvent.html.ini
+++ b/testing/web-platform/meta/dom/events/EventTarget-dispatchEvent.html.ini
@@ -12,10 +12,6 @@
expected: FAIL
bug: https://github.com/whatwg/dom/issues/362, 1314303
- [If the event's initialized flag is not set, an InvalidStateError must be thrown (FocusEvent).]
- expected: FAIL
- bug: https://github.com/whatwg/dom/issues/362, 1314303
-
[If the event's initialized flag is not set, an InvalidStateError must be thrown (IDBVersionChangeEvent).]
expected: FAIL
bug: https://github.com/whatwg/dom/issues/362, 1314303
diff --git a/testing/web-platform/meta/dom/nodes/Document-createEvent.html.ini b/testing/web-platform/meta/dom/nodes/Document-createEvent.html.ini
index 1d92f01ae..a1c822113 100644
--- a/testing/web-platform/meta/dom/nodes/Document-createEvent.html.ini
+++ b/testing/web-platform/meta/dom/nodes/Document-createEvent.html.ini
@@ -76,30 +76,6 @@
expected: FAIL
bug: https://github.com/whatwg/dom/issues/362, 1314303
- [FocusEvent should be an alias for FocusEvent.]
- expected: FAIL
- bug: https://github.com/whatwg/dom/issues/362, 1314303
-
- [createEvent('FocusEvent') should be initialized correctly.]
- expected: FAIL
- bug: https://github.com/whatwg/dom/issues/362, 1314303
-
- [focusevent should be an alias for FocusEvent.]
- expected: FAIL
- bug: https://github.com/whatwg/dom/issues/362, 1314303
-
- [createEvent('focusevent') should be initialized correctly.]
- expected: FAIL
- bug: https://github.com/whatwg/dom/issues/362, 1314303
-
- [FOCUSEVENT should be an alias for FocusEvent.]
- expected: FAIL
- bug: https://github.com/whatwg/dom/issues/362, 1314303
-
- [createEvent('FOCUSEVENT') should be initialized correctly.]
- expected: FAIL
- bug: https://github.com/whatwg/dom/issues/362, 1314303
-
[IDBVersionChangeEvent should be an alias for IDBVersionChangeEvent.]
expected: FAIL
bug: https://github.com/whatwg/dom/issues/362, 1314303
diff --git a/testing/web-platform/meta/fetch/api/headers/headers-basic.html.ini b/testing/web-platform/meta/fetch/api/headers/headers-basic.html.ini
index 27927b1e9..8c4cddf9c 100644
--- a/testing/web-platform/meta/fetch/api/headers/headers-basic.html.ini
+++ b/testing/web-platform/meta/fetch/api/headers/headers-basic.html.ini
@@ -1,17 +1,3 @@
[headers-basic.html]
type: testharness
- [Check keys method]
- expected: FAIL
-
- [Check values method]
- expected: FAIL
-
- [Check entries method]
- expected: FAIL
-
- [Check Symbol.iterator method]
- expected: FAIL
-
- [Check forEach method]
- expected: FAIL
diff --git a/testing/web-platform/meta/fetch/nosniff/worker.html.ini b/testing/web-platform/meta/fetch/nosniff/worker.html.ini
deleted file mode 100644
index 011ad15b8..000000000
--- a/testing/web-platform/meta/fetch/nosniff/worker.html.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[worker.html]
- type: testharness
- expected: ERROR
diff --git a/testing/web-platform/meta/html/semantics/forms/constraints/form-validation-checkValidity.html.ini b/testing/web-platform/meta/html/semantics/forms/constraints/form-validation-checkValidity.html.ini
index a8247d5a0..23bd8642c 100644
--- a/testing/web-platform/meta/html/semantics/forms/constraints/form-validation-checkValidity.html.ini
+++ b/testing/web-platform/meta/html/semantics/forms/constraints/form-validation-checkValidity.html.ini
@@ -32,25 +32,3 @@
[[INPUT in DATETIME status\] The datetime type must be supported.]
expected: FAIL
-
- [[INPUT in DATETIME-LOCAL status\] The datetime-local type must be supported.]
- expected: FAIL
-
- [[INPUT in DATETIME-LOCAL status\] suffering from an overflow]
- expected: FAIL
-
- [[INPUT in DATETIME-LOCAL status\] suffering from an overflow (in a form)]
- expected: FAIL
-
- [[INPUT in DATETIME-LOCAL status\] suffering from an underflow]
- expected: FAIL
-
- [[INPUT in DATETIME-LOCAL status\] suffering from an underflow (in a form)]
- expected: FAIL
-
- [[INPUT in DATETIME-LOCAL status\] suffering from a step mismatch]
- expected: FAIL
-
- [[INPUT in DATETIME-LOCAL status\] suffering from a step mismatch (in a form)]
- expected: FAIL
-
diff --git a/testing/web-platform/meta/html/semantics/forms/constraints/form-validation-reportValidity.html.ini b/testing/web-platform/meta/html/semantics/forms/constraints/form-validation-reportValidity.html.ini
index 223667997..5b373cfee 100644
--- a/testing/web-platform/meta/html/semantics/forms/constraints/form-validation-reportValidity.html.ini
+++ b/testing/web-platform/meta/html/semantics/forms/constraints/form-validation-reportValidity.html.ini
@@ -39,24 +39,3 @@
[[INPUT in DATETIME status\] The datetime type must be supported.]
expected: FAIL
- [[INPUT in DATETIME-LOCAL status\] The datetime-local type must be supported.]
- expected: FAIL
-
- [[INPUT in DATETIME-LOCAL status\] suffering from an overflow]
- expected: FAIL
-
- [[INPUT in DATETIME-LOCAL status\] suffering from an overflow (in a form)]
- expected: FAIL
-
- [[INPUT in DATETIME-LOCAL status\] suffering from an underflow]
- expected: FAIL
-
- [[INPUT in DATETIME-LOCAL status\] suffering from an underflow (in a form)]
- expected: FAIL
-
- [[INPUT in DATETIME-LOCAL status\] suffering from a step mismatch]
- expected: FAIL
-
- [[INPUT in DATETIME-LOCAL status\] suffering from a step mismatch (in a form)]
- expected: FAIL
-
diff --git a/testing/web-platform/meta/html/semantics/forms/constraints/form-validation-validity-rangeOverflow.html.ini b/testing/web-platform/meta/html/semantics/forms/constraints/form-validation-validity-rangeOverflow.html.ini
index 6af2a360e..d8c650632 100644
--- a/testing/web-platform/meta/html/semantics/forms/constraints/form-validation-validity-rangeOverflow.html.ini
+++ b/testing/web-platform/meta/html/semantics/forms/constraints/form-validation-validity-rangeOverflow.html.ini
@@ -3,21 +3,3 @@
[[INPUT in DATETIME status\] The datetime type must be supported.]
expected: FAIL
- [[INPUT in DATETIME-LOCAL status\] The datetime-local type must be supported.]
- expected: FAIL
-
- [[INPUT in DATETIME-LOCAL status\] The value is greater than max]
- expected: FAIL
-
- [[INPUT in DATETIME-LOCAL status\] The value is greater than max(with millisecond in 1 digit)]
- expected: FAIL
-
- [[INPUT in DATETIME-LOCAL status\] The value is greater than max(with millisecond in 2 digits)]
- expected: FAIL
-
- [[INPUT in DATETIME-LOCAL status\] The value is greater than max(with millisecond in 3 digits)]
- expected: FAIL
-
- [[INPUT in DATETIME-LOCAL status\] The value is greater than max(Year is 10000 should be valid)]
- expected: FAIL
-
diff --git a/testing/web-platform/meta/html/semantics/forms/constraints/form-validation-validity-rangeUnderflow.html.ini b/testing/web-platform/meta/html/semantics/forms/constraints/form-validation-validity-rangeUnderflow.html.ini
index 344ee0039..87f6f964e 100644
--- a/testing/web-platform/meta/html/semantics/forms/constraints/form-validation-validity-rangeUnderflow.html.ini
+++ b/testing/web-platform/meta/html/semantics/forms/constraints/form-validation-validity-rangeUnderflow.html.ini
@@ -3,21 +3,3 @@
[[INPUT in DATETIME status\] The datetime type must be supported.]
expected: FAIL
- [[INPUT in DATETIME-LOCAL status\] The datetime-local type must be supported.]
- expected: FAIL
-
- [[INPUT in DATETIME-LOCAL status\] The value is less than min]
- expected: FAIL
-
- [[INPUT in DATETIME-LOCAL status\] The value is less than min(with millisecond in 1 digit)]
- expected: FAIL
-
- [[INPUT in DATETIME-LOCAL status\] The value is less than min(with millisecond in 2 digits)]
- expected: FAIL
-
- [[INPUT in DATETIME-LOCAL status\] The value is less than min(with millisecond in 3 digits)]
- expected: FAIL
-
- [[INPUT in DATETIME-LOCAL status\] The value is less than min(Year is 10000 should be valid)]
- expected: FAIL
-
diff --git a/testing/web-platform/meta/html/semantics/forms/constraints/form-validation-validity-stepMismatch.html.ini b/testing/web-platform/meta/html/semantics/forms/constraints/form-validation-validity-stepMismatch.html.ini
index 0c33bdcbe..527760e60 100644
--- a/testing/web-platform/meta/html/semantics/forms/constraints/form-validation-validity-stepMismatch.html.ini
+++ b/testing/web-platform/meta/html/semantics/forms/constraints/form-validation-validity-stepMismatch.html.ini
@@ -2,7 +2,3 @@
type: testharness
[[INPUT in DATETIME status\] The datetime type must be supported.]
expected: FAIL
-
- [[INPUT in DATETIME-LOCAL status\] The value must mismatch the step]
- expected: FAIL
-
diff --git a/testing/web-platform/meta/html/semantics/forms/constraints/form-validation-validity-valid.html.ini b/testing/web-platform/meta/html/semantics/forms/constraints/form-validation-validity-valid.html.ini
index 1cddcd033..8eb7940d9 100644
--- a/testing/web-platform/meta/html/semantics/forms/constraints/form-validation-validity-valid.html.ini
+++ b/testing/web-platform/meta/html/semantics/forms/constraints/form-validation-validity-valid.html.ini
@@ -23,16 +23,3 @@
[[INPUT in MONTH status\] validity.valid must be false if validity.stepMismatch is true]
expected: FAIL
-
- [[INPUT in DATETIME-LOCAL status\] The datetime-local type must be supported.]
- expected: FAIL
-
- [[INPUT in DATETIME-LOCAL status\] validity.valid must be false if validity.rangeOverflow is true]
- expected: FAIL
-
- [[INPUT in DATETIME-LOCAL status\] validity.valid must be false if validity.rangeUnderflow is true]
- expected: FAIL
-
- [[INPUT in DATETIME-LOCAL status\] validity.valid must be false if validity.stepMismatch is true]
- expected: FAIL
-
diff --git a/testing/web-platform/meta/html/semantics/selectors/pseudo-classes/inrange-outofrange.html.ini b/testing/web-platform/meta/html/semantics/selectors/pseudo-classes/inrange-outofrange.html.ini
deleted file mode 100644
index 5e2525ac2..000000000
--- a/testing/web-platform/meta/html/semantics/selectors/pseudo-classes/inrange-outofrange.html.ini
+++ /dev/null
@@ -1,20 +0,0 @@
-[inrange-outofrange.html]
- type: testharness
- [':in-range' matches all elements that are candidates for constraint validation, have range limitations, and that are neither suffering from an underflow nor suffering from an overflow]
- expected: FAIL
-
- [':in-range' update number1's value < min]
- expected: FAIL
-
- [':in-range' update number3's min < value]
- expected: FAIL
-
- [':out-of-range' matches all elements that are candidates for constraint validation, have range limitations, and that are either suffering from an underflow or suffering from an overflow]
- expected: FAIL
-
- [':out-of-range' update number1's value < min]
- expected: FAIL
-
- [':out-of-range' update number3's min < value]
- expected: FAIL
-
diff --git a/testing/web-platform/meta/selection/getSelection.html.ini b/testing/web-platform/meta/selection/getSelection.html.ini
index 4db5721ae..672b83770 100644
--- a/testing/web-platform/meta/selection/getSelection.html.ini
+++ b/testing/web-platform/meta/selection/getSelection.html.ini
@@ -1,14 +1,5 @@
[getSelection.html]
type: testharness
- [getSelection() on HTML document with null defaultView must be null]
- expected: FAIL
-
- [getSelection() on XML document with null defaultView must be null]
- expected: FAIL
-
- [getSelection() on HTML document with null defaultView must be null inside an iframe onload]
- expected: FAIL
-
[window.getSelection() instanceof Selection in an iframe immediately after appendChild]
expected: FAIL
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/meta/url/url-constructor.html.ini b/testing/web-platform/meta/url/url-constructor.html.ini
index 6da03043b..22fddbc15 100644
--- a/testing/web-platform/meta/url/url-constructor.html.ini
+++ b/testing/web-platform/meta/url/url-constructor.html.ini
@@ -219,6 +219,3 @@
[Parsing: <http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar> against <about:blank>]
expected: FAIL
- [Parsing: <http:> against <https://example.org/foo/bar>]
- expected: FAIL
-
diff --git a/testing/web-platform/tests/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_1.html b/testing/web-platform/tests/2dcontext/drawing-images-to-the-canvas/drawimage_svg_image_1.html
index b9de85a97..74a00e037 100644
--- a/testing/web-platform/tests/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_1.html
+++ b/testing/web-platform/tests/2dcontext/drawing-images-to-the-canvas/drawimage_svg_image_1.html
@@ -1,6 +1,6 @@
<!DOCTYPE html>
<meta charset="utf-8">
-<link rel=match href=drawimage_html_image_1_ref.html>
+<link rel=match href=drawimage_svg_image_1_ref.html>
<style>
html, body {
margin: 0;
@@ -13,8 +13,8 @@ var sourceWidth = 100;
var sourceHeight = 100;
var smoothingEnabled = false;
var destCanvas = document.getElementById('dest');
-var sourceImg = document.createElement('img');
-sourceImg.src = '../2x2.png'
+var sourceImg = document.createElementNS('http://www.w3.org/2000/svg', 'image');
+sourceImg.setAttributeNS('http://www.w3.org/1999/xlink', 'href', '../2x2.png');
sourceImg.width = sourceWidth;
sourceImg.height = sourceHeight;
diff --git a/testing/web-platform/tests/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_1_ref.html b/testing/web-platform/tests/2dcontext/drawing-images-to-the-canvas/drawimage_svg_image_1_ref.html
index 60545df17..60545df17 100644
--- a/testing/web-platform/tests/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_1_ref.html
+++ b/testing/web-platform/tests/2dcontext/drawing-images-to-the-canvas/drawimage_svg_image_1_ref.html
diff --git a/testing/web-platform/tests/fetch/api/response/response-init-002.html b/testing/web-platform/tests/fetch/api/response/response-init-002.html
index 0bb2e8d0b..a48af8336 100644
--- a/testing/web-platform/tests/fetch/api/response/response-init-002.html
+++ b/testing/web-platform/tests/fetch/api/response/response-init-002.html
@@ -65,6 +65,11 @@
});
}, "Testing empty Response Content-Type header");
+ test(function() {
+ var response = new Response(null, {status: 204});
+ assert_equals(response.body, null);
+ }, "Testing null Response body");
+
</script>
</body>
</html>
diff --git a/testing/web-platform/tests/fetch/nosniff/script.html b/testing/web-platform/tests/fetch/nosniff/script.html
index 667f3c99a..c5c5167f5 100644
--- a/testing/web-platform/tests/fetch/nosniff/script.html
+++ b/testing/web-platform/tests/fetch/nosniff/script.html
@@ -4,8 +4,8 @@
<script>
var log = function() {}, // see comment below
p = function() {}, // see comment below
- fails = ["", "?type=", "?type=x", "?type=x/x"],
- passes = ["?type=text/javascript", "?type=text/ecmascript", "?type=text/ecmascript;blah"]
+ fails = ["", "?type=", "?type=x", "?type=x/x", "?type=text/json"],
+ passes = ["?type=text/javascript", "?type=text/ecmascript", "?type=text/ecmascript;blah", "?type=text/javascript1.0"]
// Ideally we'd also check whether the scripts in fact execute, but that would involve
// timers and might get a bit racy without cross-browser support for the execute events.
diff --git a/testing/web-platform/tests/html/webappapis/idle-callbacks/callback-suspended.html b/testing/web-platform/tests/html/webappapis/idle-callbacks/callback-suspended.html
new file mode 100644
index 000000000..6040de922
--- /dev/null
+++ b/testing/web-platform/tests/html/webappapis/idle-callbacks/callback-suspended.html
@@ -0,0 +1,93 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>Dispatching idle callbacks should be able to be suspended and then resumed</title>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<div id="log"></div>
+<script>
+ function withEventListener(target, event, handler) {
+ handler = handler || (e => e);
+ return new Promise(resolve => {
+ let wrapper = function(e) {
+ let result = handler(e);
+ if (!result) {
+ return;
+ }
+
+ resolve(result);
+ }
+ target.addEventListener(event, wrapper, { once: true });
+ });
+ }
+
+ function makePostBackUrl(name) {
+ return new URL('resources/post_name_on_load.html?name=' + name,
+ window.location).href;
+ }
+
+ function waitForMessage(message, handler) {
+ return withEventListener(window, 'message', e => (e.data === message) && handler(e));;
+ }
+
+ function withWindow(name) {
+ let win = window.open(makePostBackUrl(name))
+ return waitForMessage(name, _ => win);
+ }
+
+ function navigateWindow(win, name) {
+ win.location = makePostBackUrl(name);
+ return waitForMessage(name, _ => win);
+ }
+
+ function waitDuration(delay) {
+ return new Promise(resolve => {
+ setTimeout(resolve, delay);
+ })
+ }
+
+ function goBack(win) {
+ var p = withEventListener(win, 'pagehide');
+ win.history.back();
+ return p;
+ }
+
+ promise_test(t => {
+ let idleCalled = false;
+ let running = true;
+ return withWindow('foo')
+ .then(win => {
+ let callback = function(d) {
+ idleCalled = true;
+ if (running) {
+ win.requestIdleCallback(callback);
+ }
+ };
+
+ win.requestIdleCallback(callback);
+
+ return navigateWindow(win, 'bar')
+ .then(_ => idleCalled = false)
+ .then(_ => waitDuration(2000))
+ .then(_ => {
+ assert_false(idleCalled, "idle callback shouldn't have been called yet");
+ return goBack(win);
+ })
+ .then(_ => Promise.race([
+ // At this point it's a matter of having bfcache ...
+ waitDuration(2000)
+ .then(_ => {
+ assert_true(idleCalled, "idle callback should've been called by now");
+ running = false;
+ }),
+ // ... or not. If not, we expect a load event.
+ waitForMessage("foo")
+ ]))
+ .then(_ => win.close())
+ .catch(e => {
+ win.close();
+ throw e;
+ })
+ });
+ });
+
+</script>
diff --git a/testing/web-platform/tests/html/webappapis/idle-callbacks/callback-timeout.html b/testing/web-platform/tests/html/webappapis/idle-callbacks/callback-timeout.html
index 823d5f5db..cc2660a19 100644
--- a/testing/web-platform/tests/html/webappapis/idle-callbacks/callback-timeout.html
+++ b/testing/web-platform/tests/html/webappapis/idle-callbacks/callback-timeout.html
@@ -25,4 +25,19 @@
}
window.requestIdleCallback(t.step_func(f));
}, "requestIdleCallback callback should time out");
+
+ async_test(function (t) {
+ assert_false(document.hidden, "document.hidden must exist and be false to run this test properly");
+ function g(deadline) {
+ assert_false(deadline.didTimeout)
+ t.done();
+ }
+
+ function f(deadline) {
+ assert_false(deadline.didTimeout);
+ window.requestIdleCallback(t.step_func(g), {timeout:100000});
+ }
+ window.requestIdleCallback(t.step_func(f));
+ }, "requestIdleCallback callback should not time out");
+
</script>
diff --git a/testing/web-platform/tests/html/webappapis/idle-callbacks/cancel-invoked.html b/testing/web-platform/tests/html/webappapis/idle-callbacks/cancel-invoked.html
index 8956b8709..9fb77d65d 100644
--- a/testing/web-platform/tests/html/webappapis/idle-callbacks/cancel-invoked.html
+++ b/testing/web-platform/tests/html/webappapis/idle-callbacks/cancel-invoked.html
@@ -23,4 +23,10 @@
t.done();
}, 2000);
}, "A cancelled callback is never invoked");
+
+ async_test(function (t) {
+ var handle = requestIdleCallback(t.step_func_done(function () {
+ cancelIdleCallback(handle);
+ }));
+ }, "Cancelling the currently executing idle callback should be allowed");
</script>
diff --git a/testing/web-platform/tests/html/webappapis/idle-callbacks/resources/post_name_on_load.html b/testing/web-platform/tests/html/webappapis/idle-callbacks/resources/post_name_on_load.html
new file mode 100644
index 000000000..4679a6e6e
--- /dev/null
+++ b/testing/web-platform/tests/html/webappapis/idle-callbacks/resources/post_name_on_load.html
@@ -0,0 +1,7 @@
+<!doctype html>
+<script>
+ addEventListener('load', _ => {
+ let params = new URLSearchParams(window.location.search);
+ window.opener.postMessage(params.get('name'), '*');
+ });
+</script>
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/workers/Worker_cross_origin_security_err.htm b/testing/web-platform/tests/workers/Worker_cross_origin_security_err.htm
index 647a8b81e..d57dc29d5 100644
--- a/testing/web-platform/tests/workers/Worker_cross_origin_security_err.htm
+++ b/testing/web-platform/tests/workers/Worker_cross_origin_security_err.htm
@@ -8,7 +8,7 @@ async_test(function(t) {
try {
var w = new Worker("ftp://example.org/support/WorkerBasic.js");
w.onerror = t.step_func_done(function(e) {
- assert_true(e instanceof ErrorEvent);
+ assert_true(e instanceof Event);
});
} catch (e) {
t.step_func_done(function(e) { assert_true(true); });
diff --git a/testing/web-platform/tests/workers/constructors/SharedWorker/same-origin.html b/testing/web-platform/tests/workers/constructors/SharedWorker/same-origin.html
index 2e0dd8db3..78d53164e 100644
--- a/testing/web-platform/tests/workers/constructors/SharedWorker/same-origin.html
+++ b/testing/web-platform/tests/workers/constructors/SharedWorker/same-origin.html
@@ -16,7 +16,7 @@ function testSharedWorkerHelper(t, script) {
try {
var worker = new SharedWorker(script, '');
worker.onerror = t.step_func_done(function(e) {
- assert_true(e instanceof ErrorEvent);
+ assert_true(e instanceof Event);
});
} catch (e) {
t.step_func_done(function(e) { assert_true(true); });
diff --git a/testing/web-platform/tests/workers/constructors/Worker/same-origin.html b/testing/web-platform/tests/workers/constructors/Worker/same-origin.html
index 9b0148da3..bbc4382d0 100644
--- a/testing/web-platform/tests/workers/constructors/Worker/same-origin.html
+++ b/testing/web-platform/tests/workers/constructors/Worker/same-origin.html
@@ -14,7 +14,7 @@ function testSharedWorkerHelper(t, script) {
try {
var worker = new SharedWorker(script, '');
worker.onerror = t.step_func_done(function(e) {
- assert_true(e instanceof ErrorEvent);
+ assert_true(e instanceof Event);
});
} catch (e) {
t.step_func_done(function(e) { assert_true(true); });
diff --git a/testing/xpcshell/head.js b/testing/xpcshell/head.js
index 74fd482cf..e204a4512 100644
--- a/testing/xpcshell/head.js
+++ b/testing/xpcshell/head.js
@@ -95,23 +95,6 @@ try {
}
catch (e) { }
-// Configure crash reporting, if possible
-// We rely on the Python harness to set MOZ_CRASHREPORTER,
-// MOZ_CRASHREPORTER_NO_REPORT, and handle checking for minidumps.
-// Note that if we're in a child process, we don't want to init the
-// crashreporter component.
-try {
- if (runningInParent &&
- "@mozilla.org/toolkit/crash-reporter;1" in Components.classes) {
- let crashReporter =
- Components.classes["@mozilla.org/toolkit/crash-reporter;1"]
- .getService(Components.interfaces.nsICrashReporter);
- crashReporter.UpdateCrashEventsDir();
- crashReporter.minidumpPath = do_get_minidumpdir();
- }
-}
-catch (e) { }
-
// Configure a console listener so messages sent to it are logged as part
// of the test.
try {
diff --git a/testing/xpcshell/runxpcshelltests.py b/testing/xpcshell/runxpcshelltests.py
index 7c88343dc..34af6639f 100755
--- a/testing/xpcshell/runxpcshelltests.py
+++ b/testing/xpcshell/runxpcshelltests.py
@@ -910,9 +910,6 @@ class XPCShellTests(object):
"""
# Make assertions fatal
self.env["XPCOM_DEBUG_BREAK"] = "stack-and-abort"
- # Crash reporting interferes with debugging
- if not self.debuggerInfo:
- self.env["MOZ_CRASHREPORTER"] = "1"
# Don't launch the crash reporter client
self.env["MOZ_CRASHREPORTER_NO_REPORT"] = "1"
# Don't permit remote connections by default.