Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(453)

Unified Diff: LayoutTests/http/tests/w3c/webperf/approved/UserTiming/test_user_timing_mark_exceptions.htm

Issue 1191043004: Import hr-time and user-timing tests, remove redundant webperf copies (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add idlharness result Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/http/tests/w3c/webperf/approved/UserTiming/test_user_timing_mark_exceptions.htm
diff --git a/LayoutTests/http/tests/w3c/webperf/approved/UserTiming/test_user_timing_mark_exceptions.htm b/LayoutTests/http/tests/w3c/webperf/approved/UserTiming/test_user_timing_mark_exceptions.htm
deleted file mode 100644
index ca3fc465ec77d5a078f07bcbcec4f87671823d92..0000000000000000000000000000000000000000
--- a/LayoutTests/http/tests/w3c/webperf/approved/UserTiming/test_user_timing_mark_exceptions.htm
+++ /dev/null
@@ -1,105 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <meta charset="UTF-8" />
- <title>window.performance User Timing mark() method is throwing the proper exceptions</title>
- <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
- <link rel="help" href="http://127.0.0.1:8000/webperf/specs/UserTiming/#dom-performance-mark"/>
- <script src="/w3c/resources/testharness.js"></script>
- <script src="/w3c/resources/testharnessreport.js"></script>
- <script src="/w3c/webperf/resources/webperftestharness.js"></script>
-
- <script type="text/javascript">
- // navigation timing attributes
- var timingAttributes = [
- 'connectEnd',
- 'connectStart',
- 'domComplete',
- 'domContentLoadedEventEnd',
- 'domContentLoadedEventStart',
- 'domInteractive',
- 'domLoading',
- 'domainLookupEnd',
- 'domainLookupStart',
- 'fetchStart',
- 'loadEventEnd',
- 'loadEventStart',
- 'navigationStart',
- 'redirectEnd',
- 'redirectStart',
- 'requestStart',
- 'responseEnd',
- 'responseStart',
- 'unloadEventEnd',
- 'unloadEventStart'
- ];
-
- // test data
- var markExceptionThrown = false;
-
- setup({timeout:1000, explicit_done: true});
-
- test_namespace();
-
- function onload_test()
- {
- // test for existance of User Timing and Performance Timeline interface
- if (window.performance.mark == undefined ||
- window.performance.clearMarks == undefined ||
- window.performance.measure == undefined ||
- window.performance.clearMeasures == undefined ||
- window.performance.getEntriesByName == undefined ||
- window.performance.getEntriesByType == undefined ||
- window.performance.getEntries == undefined)
- {
- test_true(false,
- "The User Timing and Performance Timeline interfaces, which are required for this test, " +
- "are defined.");
-
- done();
- }
- else
- {
- test_mark_exceptions();
- }
- }
-
- function test_mark_exceptions()
- {
- // loop through mark scenarios
- for (var i in timingAttributes)
- {
- try
- {
- // create the mark
- window.performance.mark(timingAttributes[i]);
-
- test_true(false,
- "window.performance.mark(\"" + timingAttributes[i] + "\") threw an exception.");
- }
- catch(e)
- {
- test_true(true,
- "window.performance.mark(\"" + timingAttributes[i] + "\") threw an exception.");
-
- // confirm that a SYNTAX_ERR exception is thrown and not any other exception
- test_equals(e.code,
- e.SYNTAX_ERR,
- "window.performance.mark(\"" + timingAttributes[i] + "\") threw a SYNTAX_ERR " +
- "exception.");
- }
- }
-
- done();
- }
- </script>
- </head>
- <body onload="onload_test();">
- <h1>Description</h1>
- <p>This test validates that the performance.mark() method throws a SYNTAX_ERR exception whenever a navigation
- timing attribute is provided for the name parameter.
- </p>
-
- <div id="log"></div>
- </body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698