Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2483 from Ms2ger/script-blocking-style
Add tests for stylesheets blocking scripts without @import.
- Loading branch information
Showing
4 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
File renamed without changes.
20 changes: 20 additions & 0 deletions
20
old-tests/submission/Opera/script_scheduling/106-noimport.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 |
---|---|---|
@@ -0,0 +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> | ||
<!-- this stylesheet blocks scripts --> | ||
<link rel="stylesheet" href="css/background.css?pipe=trickle(d2)"> | ||
</head> | ||
<body> | ||
<div id="log">FAILED (This TC requires JavaScript enabled)</div> | ||
<div id="test">Test</div> | ||
|
||
<script> | ||
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
21 changes: 21 additions & 0 deletions
21
old-tests/submission/Opera/script_scheduling/107-noimport.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 |
---|---|---|
@@ -0,0 +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> | ||
</head> | ||
<body> | ||
<div id="log">FAILED (This TC requires JavaScript enabled)</div> | ||
<div id="test">Test</div> | ||
|
||
<!-- this stylesheet blocks scripts --> | ||
<script> | ||
test(function() { | ||
document.write("<link rel='stylesheet' href='css/background.css?pipe=trickle(d2)'>"); | ||
// note that the pass condition here is not per spec (but does match implementations) as of 2012-06-26 | ||
assert_equals(getComputedStyle(document.getElementById("test")).position, | ||
"static"); | ||
}); | ||
</script> | ||
</body></html> |