mirror of
https://github.com/ManchildProductions/UXP-Fixed.git
synced 2026-07-21 03:48:43 +00:00
Bug 1323941 - navigationStart should not be exposed to workers as timing attribute
https://hg.mozilla.org/mozilla-central/rev/6be7eb833b11
This commit is contained in:
@@ -31099,6 +31099,10 @@
|
||||
"path": "user-timing/test_user_timing_mark.html",
|
||||
"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"
|
||||
|
||||
@@ -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',
|
||||
|
||||
+32
@@ -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>
|
||||
+14
@@ -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();
|
||||
Reference in New Issue
Block a user