forked from node-inspector/node-inspector
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NetworkAgent: support data scheme URLs
Implemented support for data scheme URLs. This allows sourcemap files to be embedded in the sourceMappingURL in the generated js file.
- Loading branch information
Miroslav Bajtos
committed
Sep 12, 2013
1 parent
405dd3d
commit 14d54b1
Showing
3 changed files
with
47 additions
and
8 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,21 @@ | ||
var expect = require('chai').expect, | ||
NetworkAgent = require('../lib/NetworkAgent.js').NetworkAgent; | ||
|
||
describe('NetworkAgent', function() { | ||
describe('loadResourceForFrontend', function() { | ||
it('should load data URLs', function(done) { | ||
var agent = new NetworkAgent(); | ||
agent.loadResourceForFrontend( | ||
{ | ||
url: 'data:text/plain;base64,aGVsbG8gd29ybGQ=' | ||
}, | ||
function(err, result) { | ||
if (err) return done(err); | ||
expect(result.content).to.equal('hello world'); | ||
done(); | ||
} | ||
); | ||
}); | ||
}); | ||
}) | ||
|