Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(416)

Unified Diff: javatests/org/chromium/distiller/ParsedUrlTest.java

Issue 1178633002: implement parser for new pagination algorithm (Closed) Base URL: https://github.com/chromium/dom-distiller.git@master
Patch Set: addr wychen's comments Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « javatests/org/chromium/distiller/PageParameterParserTest.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: javatests/org/chromium/distiller/ParsedUrlTest.java
diff --git a/javatests/org/chromium/distiller/ParsedUrlTest.java b/javatests/org/chromium/distiller/ParsedUrlTest.java
index 0d986dd25e1b565838175c44e7d57a5d6e25c2af..3bb33dcd841cd2a814d9c2e78c0be0b52a0e9fe0 100644
--- a/javatests/org/chromium/distiller/ParsedUrlTest.java
+++ b/javatests/org/chromium/distiller/ParsedUrlTest.java
@@ -54,6 +54,18 @@ public class ParsedUrlTest extends JsTestCase {
assertEquals("http://www.foo.com/path0/path1/;pathParams?qA=B&qC=D", url.toString());
}
+ public void testSetHash() {
+ ParsedUrl url = ParsedUrl.create(VALID_URL + "#jumpToFoo");
+ assertTrue(url != null);
+ assertEquals("#jumpToFoo", url.getHash());
+ url.setHash("dontJumpToFoo");
+ assertEquals("#dontJumpToFoo", url.getHash());
+ assertEquals(VALID_URL + "#dontJumpToFoo", url.toString());
+ url.setHash("");
+ assertEquals("", url.getHash());
+ assertEquals(VALID_URL, url.toString());
+ }
+
public void testReplaceQueryValue() {
ParsedUrl url = ParsedUrl.create(VALID_URL);
assertTrue(url != null);
« no previous file with comments | « javatests/org/chromium/distiller/PageParameterParserTest.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698