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

Side by Side Diff: chrome/browser/local_discovery/storage/path_util_unittest.cc

Issue 492693004: Delete Privet filesystem code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 3 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
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 "chrome/browser/local_discovery/storage/path_util.h"
6 #include "testing/gtest/include/gtest/gtest.h"
7
8 namespace local_discovery {
9
10 TEST(PathUtilTest, ParsePrivetPath) {
11 ParsedPrivetPath path(base::FilePath(FILE_PATH_LITERAL(
12 "/privet/MyId._privet._tcp.local/Some name/some/path")));
13
14 EXPECT_EQ("MyId._privet._tcp.local", path.service_name);
15 EXPECT_EQ("/some/path", path.path);
16 }
17
18 TEST(PathUtilTest, ParseEmptyPath) {
19 ParsedPrivetPath path(base::FilePath(FILE_PATH_LITERAL(
20 "/privet/MyId._privet._tcp.local/Some name/")));
21
22 EXPECT_EQ("MyId._privet._tcp.local", path.service_name);
23 EXPECT_EQ("/", path.path);
24 }
25
26 } // namespace local_discovery
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698