Bug 1070146 - Test resource timing info for script resources. r=bz

This commit is contained in:
Valentin Gosu 2014-09-24 01:51:54 +03:00
Родитель e94396781f
Коммит dde978715d
3 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -32,6 +32,7 @@ support-files =
res7.resource^headers^
res8.resource
res8.resource^headers^
resource_timing.js
[test_497898.html]
skip-if = (buildapp == 'b2g' && toolkit != 'gonk') || toolkit == 'android' #Bug 931116, b2g desktop specific, initial triage

Просмотреть файл

Просмотреть файл

@ -86,6 +86,10 @@ function firstCheck() {
ok(!!entries[0], "redirected res8.resource is missing from entries");
checkRedirectCrossOriginResourceSameOrigin(entries[0]);
entries = window.performance.getEntriesByName("http://mochi.test:8888/tests/dom/tests/mochitest/general/resource_timing.js");
ok(!!entries[0], "same origin resource_timing.js is missing from entries");
checkSameOrigin(entries[0]);
is(bufferFullCounter, expectedBufferFullEvents, "Buffer full was called");
finishTests();
}
@ -176,6 +180,7 @@ function finishTests() {
<object data="http://test1.example.com/tests/dom/tests/mochitest/general/res6.resource"> <!-- cross origin, Timing-Allow-Origin: "" (empty string) -->
<object data="http://test1.example.com/tests/dom/tests/mochitest/general/res7.resource"> <!-- cross origin, Timing-Allow-Origin: http://mochi.test:8888 http://test1.com header -->
<object data="http://test1.example.com/tests/dom/tests/mochitest/general/res8.resource"> <!-- double cross origin redirect -->
<script type="text/javascript" src="http://mochi.test:8888/tests/dom/tests/mochitest/general/resource_timing.js"></script> <!-- same origin script -->
</div>
</body>