OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 #include <string> | 5 #include <string> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/base64.h" | 8 #include "base/base64.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 base::FilePath::FromUTF8Unsafe("background.js")))); | 78 base::FilePath::FromUTF8Unsafe("background.js")))); |
79 | 79 |
80 base::FilePath foo_bar_html = | 80 base::FilePath foo_bar_html = |
81 base::FilePath(FILE_PATH_LITERAL("foo")).AppendASCII("bar.html"); | 81 base::FilePath(FILE_PATH_LITERAL("foo")).AppendASCII("bar.html"); |
82 EXPECT_FALSE(foo_bar_html.IsAbsolute()); | 82 EXPECT_FALSE(foo_bar_html.IsAbsolute()); |
83 EXPECT_TRUE( | 83 EXPECT_TRUE( |
84 Base64UrlStringEquals("L37LFbT_hmtxRL7AfGZN9YTpW6yoz_ZiQ1opLJn1NZU", | 84 Base64UrlStringEquals("L37LFbT_hmtxRL7AfGZN9YTpW6yoz_ZiQ1opLJn1NZU", |
85 contents.GetTreeHashRoot(foo_bar_html))); | 85 contents.GetTreeHashRoot(foo_bar_html))); |
86 | 86 |
87 base::FilePath nonexistent = base::FilePath::FromUTF8Unsafe("nonexistent"); | 87 base::FilePath nonexistent = base::FilePath::FromUTF8Unsafe("nonexistent"); |
88 EXPECT_TRUE(contents.GetTreeHashRoot(nonexistent) == NULL); | 88 EXPECT_TRUE(contents.GetTreeHashRoot(nonexistent) == nullptr); |
89 } | 89 } |
90 | 90 |
91 } // namespace extensions | 91 } // namespace extensions |
OLD | NEW |