This repository has been archived by the owner on Mar 13, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #68. Redirected url is no longer considered for de-duping, but …
…redirected url is used as import baseURI.
- Loading branch information
Showing
6 changed files
with
46 additions
and
15 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
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
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,3 @@ | ||
<script> | ||
load = true; | ||
</script> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,10 @@ | ||
<script> | ||
redirect = true; | ||
</script> | ||
<style> | ||
.image { | ||
background: url(googley.png); | ||
height: 190px; | ||
width: 538px; | ||
} | ||
</style> |
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,27 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<title>load redirect Test</title> | ||
<script src="../../../../tools/test/htmltest.js"></script> | ||
<script src="../../../../tools/test/chai/chai.js"></script> | ||
<script src="../../../html-imports.js"></script> | ||
<link rel="import" href="imports/load-1.html"> | ||
</head> | ||
<body> | ||
<div id="test" class="image"></div> | ||
<script> | ||
document.addEventListener('HTMLImportsLoaded', function() { | ||
chai.assert.ok(window.redirect, 'redirected script ran'); | ||
var l = document.querySelector('link'); | ||
var a = document.createElement('a'); | ||
a.href = 'imports/redirect/load.html'; | ||
chai.assert.match(l.import.baseURI, new RegExp(a.pathname), 'import baseURI redirected'); | ||
setTimeout(function() { | ||
var bg = getComputedStyle(document.querySelector('#test')).backgroundImage; | ||
chai.assert.match(bg, /redirect\/googley.png/, 'import image properly referenced'); | ||
done(); | ||
}); | ||
}); | ||
</script> | ||
</body> | ||
</html> |