Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make script scheduling tests not depend on clock synchronisation betw…
…een client and server
- Loading branch information
Showing
5 changed files
with
21 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,20 @@ | ||
<!DOCTYPE html> | ||
<html><head> | ||
<title> scheduler: stylesheets blocking scripts</title> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="testlib/testlib.js"></script> | ||
<title> scheduler: stylesheets blocking scripts</title> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="testlib/testlib.js"></script> | ||
<!-- this stylesheet blocks scripts --> | ||
<link rel="stylesheet" href="css/import.css?pipe=trickle(d2)"> | ||
</head> | ||
<body> | ||
<div id="log">FAILED (This TC requires JavaScript enabled)</div> | ||
<div id="log">FAILED (This TC requires JavaScript enabled)</div> | ||
<div id="test">Test</div> | ||
|
||
<script> | ||
var t = async_test(); | ||
var t0 = Date.now(); | ||
</script> | ||
|
||
<!-- this stylesheet blocks scripts --> | ||
<link rel="stylesheet" href="css/import.css?pipe=trickle(d2)"> | ||
|
||
<script> | ||
t.step(function() { | ||
var t1 = Date.now(); | ||
assert_true(t1 - t0 > 1000, "Delayed by " + (t1-t0) + "ms expected > 1000ms"); | ||
t.done(); | ||
test(function() { | ||
assert_equals(getComputedStyle(document.getElementById("test")).position, | ||
"fixed"); | ||
}); | ||
</script> | ||
</body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,21 @@ | ||
<!DOCTYPE html> | ||
<html><head> | ||
<title> scheduler: stylesheets blocking scripts document.write</title> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="testlib/testlib.js"></script> | ||
<title> scheduler: stylesheets blocking scripts document.write</title> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="testlib/testlib.js"></script> | ||
</head> | ||
<body> | ||
<div id="log">FAILED (This TC requires JavaScript enabled)</div> | ||
<div id="log">FAILED (This TC requires JavaScript enabled)</div> | ||
<div id="test">Test</div> | ||
|
||
<script> | ||
var t = async_test(); | ||
var t0 = Date.now(); | ||
</script> | ||
|
||
<!-- this stylesheet blocks scripts --> | ||
<script> | ||
t.step(function() { | ||
test(function() { | ||
document.write("<link rel='stylesheet' href='css/import.css?pipe=trickle(d2)'>"); | ||
var t1 = Date.now(); | ||
<!-- note that the pass condition here is not per spec (but does match implementations) as of 2012-06-26 --> | ||
assert_true(t1-t0 < 1000, "Stylesheet blocked scripts, delayed by " + (t1-t0) + "ms expected < 1000ms"); | ||
t.done(); | ||
assert_equals(getComputedStyle(document.getElementById("test")).position, | ||
"static"); | ||
}); | ||
</script> | ||
</body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 1 addition & 3 deletions
4
old-tests/submission/Opera/script_scheduling/css/background.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
#test {background-image:url("1x1-green.png?pipe=trickle(d2)"); | ||
background-repeat:repeat; | ||
background-color:orange;} | ||
#test {position:fixed} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
@import("background.css") | ||
@import url("background.css") |