This repository has been archived by the owner on Aug 18, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
moving browser.js, testing browser.js
- Loading branch information
1 parent
bdaf170
commit faeef59
Showing
6 changed files
with
31 additions
and
10 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Johnson.require("johnson/browser/xmlw3cdom"); | ||
Johnson.require("johnson/browser/xmlsax"); | ||
Johnson.require("johnson/browser/env"); |
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
File renamed without changes.
File renamed without changes.
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,17 @@ | ||
require File.expand_path(File.join(File.dirname(__FILE__), "/../helper")) | ||
|
||
module Johnson | ||
class BrowserTest < Johnson::TestCase | ||
def setup | ||
@context = Johnson::Context.new | ||
@context.evaluate('Johnson.require("johnson/browser");') | ||
end | ||
|
||
def test_set_location_returns_location | ||
filename = "file://#{File.expand_path(__FILE__)}" | ||
@context.evaluate("window.location = '#{filename}'") | ||
uri = URI.parse(filename) | ||
assert_equal(uri.to_s, @context.evaluate('window.location').to_s) | ||
end | ||
end | ||
end |