OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |