Check USB device path access when prompting users to select a device.
[chromium-blink-merge.git] / chrome / utility / importer / bookmarks_file_importer_unittest.cc
blob9a6df2b705b0a2f10840a32a3401c092957780ae
1 // Copyright 2013 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.
5 #include "chrome/utility/importer/bookmarks_file_importer.h"
7 #include "testing/gtest/include/gtest/gtest.h"
8 #include "url/gurl.h"
10 namespace internal {
12 bool CanImportURL(const GURL& url);
14 } // namespace internal
16 TEST(BookmarksFileImporterTest, CanImportURL) {
17 struct TestCase {
18 const std::string url;
19 const bool can_be_imported;
20 } test_cases[] = {
21 { "http://www.example.com", true },
22 { "https://www.example.com", true },
23 { "ftp://www.example.com", true },
24 { "aim:GoIm?screenname=myscreenname&message=hello", true },
25 { "chrome://version", true },
26 { "chrome://chrome-urls", true },
27 { "chrome://kill", true },
28 { "chrome://chrome", true },
29 { "chrome://about", true },
30 { "about:version", true },
31 { "about:blank", true },
32 { "about:credits", true },
33 { "wyciwyg://example.com", false },
34 { "place://google.com", false },
35 { "about:config", false },
36 { "about:moon", false },
39 for (size_t i = 0; i < arraysize(test_cases); ++i) {
40 EXPECT_EQ(test_cases[i].can_be_imported,
41 internal::CanImportURL(GURL(test_cases[i].url)));