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

Side by Side Diff: components/dom_distiller/core/url_utils_unittest.cc

Issue 151003006: Add support for distilling arbitrary URLs in DOM Distiller Viewer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added new strings to iOS whitelist Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « components/dom_distiller/core/url_utils.cc ('k') | components/dom_distiller/webui/DEPS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "components/dom_distiller/core/url_utils.h"
6
7 #include "testing/gtest/include/gtest/gtest.h"
8
9 namespace dom_distiller {
10
11 namespace url_utils {
12
13 TEST(DomDistillerUrlUtilsTest, TestPathUtil) {
14 const std::string single_key = "mypath?foo=bar";
15 EXPECT_EQ("bar", GetValueForKeyInUrlPathQuery(single_key, "foo"));
16 const std::string two_keys = "mypath?key1=foo&key2=bar";
17 EXPECT_EQ("foo", GetValueForKeyInUrlPathQuery(two_keys, "key1"));
18 EXPECT_EQ("bar", GetValueForKeyInUrlPathQuery(two_keys, "key2"));
19 const std::string multiple_same_key = "mypath?key=foo&key=bar";
20 EXPECT_EQ("foo", GetValueForKeyInUrlPathQuery(multiple_same_key, "key"));
21 }
22
23 } // namespace url_utils
24
25 } // namespace dom_distiller
OLDNEW
« no previous file with comments | « components/dom_distiller/core/url_utils.cc ('k') | components/dom_distiller/webui/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698