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

Side by Side Diff: extensions/shell/browser/shell_nacl_browser_delegate_unittest.cc

Issue 1226673003: Move MatchPattern to its own header and the base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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
OLDNEW
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 "extensions/shell/browser/shell_nacl_browser_delegate.h" 5 #include "extensions/shell/browser/shell_nacl_browser_delegate.h"
6 6
7 #include "base/strings/pattern.h"
7 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
8 #include "content/public/test/test_browser_context.h" 9 #include "content/public/test/test_browser_context.h"
9 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
10 11
11 namespace extensions { 12 namespace extensions {
12 13
13 typedef testing::Test ShellNaClBrowserDelegateTest; 14 typedef testing::Test ShellNaClBrowserDelegateTest;
14 15
15 // Verifies that the returned version string has a valid format. 16 // Verifies that the returned version string has a valid format.
16 TEST_F(ShellNaClBrowserDelegateTest, VersionString) { 17 TEST_F(ShellNaClBrowserDelegateTest, VersionString) {
17 content::TestBrowserContext browser_context; 18 content::TestBrowserContext browser_context;
18 ShellNaClBrowserDelegate delegate(&browser_context); 19 ShellNaClBrowserDelegate delegate(&browser_context);
19 20
20 // Version should look like "1.2.3.4 (5)". 21 // Version should look like "1.2.3.4 (5)".
21 std::string version = delegate.GetVersionString(); 22 std::string version = delegate.GetVersionString();
22 EXPECT_TRUE(MatchPattern(version, "*.*.*.* (*)")) << "bad version " 23 EXPECT_TRUE(base::MatchPattern(version, "*.*.*.* (*)")) << "bad version "
23 << version; 24 << version;
24 } 25 }
25 26
26 } // namespace extensions 27 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/common/user_script.cc ('k') | extensions/shell/common/shell_content_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698