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

Side by Side Diff: javatests/org/chromium/distiller/ParsedUrlTest.java

Issue 1029593003: implement validations of pagination URLs (Closed) Base URL: https://github.com/chromium/dom-distiller.git@master
Patch Set: addr chris's comments Created 5 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.distiller; 5 package org.chromium.distiller;
6 6
7 public class ParsedUrlTest extends JsTestCase { 7 public class ParsedUrlTest extends JsTestCase {
8 8
9 private static final String VALID_URL = 9 private static final String VALID_URL =
10 "http://fooUser:fooPwd@www.foo.com/path0/path1/;pathParams?qA=B&qC=D "; 10 "http://fooUser:fooPwd@www.foo.com/path0/path1/;pathParams?qA=B&qC=D ";
11 11
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 ParsedUrl url = ParsedUrl.create(VALID_URL); 58 ParsedUrl url = ParsedUrl.create(VALID_URL);
59 assertTrue(url != null); 59 assertTrue(url != null);
60 assertEquals("?qA=B&qC=D", url.getQuery()); 60 assertEquals("?qA=B&qC=D", url.getQuery());
61 assertEquals("http://fooUser:fooPwd@www.foo.com/path0/path1/;pathParams? qA=E&qC=D", 61 assertEquals("http://fooUser:fooPwd@www.foo.com/path0/path1/;pathParams? qA=E&qC=D",
62 url.replaceQueryValue("qA", "B", "E")); 62 url.replaceQueryValue("qA", "B", "E"));
63 // Original query shouldn't change. 63 // Original query shouldn't change.
64 assertEquals("?qA=B&qC=D", url.getQuery()); 64 assertEquals("?qA=B&qC=D", url.getQuery());
65 } 65 }
66 66
67 } 67 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698