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

Side by Side Diff: chrome/browser/extensions/api/messaging/native_messaging_host_manifest_unittest.cc

Issue 624153002: replace OVERRIDE and FINAL with override and final in chrome/browser/extensions/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "chrome/browser/extensions/api/messaging/native_messaging_host_manifest .h" 5 #include "chrome/browser/extensions/api/messaging/native_messaging_host_manifest .h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
10 #include "base/json/string_escape.h" 10 #include "base/json/string_escape.h"
11 #include "extensions/common/url_pattern_set.h" 11 #include "extensions/common/url_pattern_set.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 #include "url/gurl.h" 13 #include "url/gurl.h"
14 14
15 namespace extensions { 15 namespace extensions {
16 16
17 const char kTestHostName[] = "com.chrome.test.native_host"; 17 const char kTestHostName[] = "com.chrome.test.native_host";
18 #if defined(OS_WIN) 18 #if defined(OS_WIN)
19 const char kTestHostPath[] = "C:\\ProgramFiles\\host.exe"; 19 const char kTestHostPath[] = "C:\\ProgramFiles\\host.exe";
20 #else 20 #else
21 const char kTestHostPath[] = "/usr/bin/host"; 21 const char kTestHostPath[] = "/usr/bin/host";
22 #endif 22 #endif
23 const char kTestOrigin[] = 23 const char kTestOrigin[] =
24 "chrome-extension://knldjmfmopnpolahpmmgbagdohdnhkik/"; 24 "chrome-extension://knldjmfmopnpolahpmmgbagdohdnhkik/";
25 25
26 class NativeMessagingHostManifestTest : public ::testing::Test { 26 class NativeMessagingHostManifestTest : public ::testing::Test {
27 public: 27 public:
28 virtual void SetUp() OVERRIDE { 28 virtual void SetUp() override {
29 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 29 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
30 manifest_path_ = temp_dir_.path().AppendASCII("test.json"); 30 manifest_path_ = temp_dir_.path().AppendASCII("test.json");
31 } 31 }
32 32
33 protected: 33 protected:
34 bool WriteManifest(const std::string& name, 34 bool WriteManifest(const std::string& name,
35 const std::string& path, 35 const std::string& path,
36 const std::string& origin) { 36 const std::string& origin) {
37 return WriteManifest("{" 37 return WriteManifest("{"
38 " \"name\": \"" + name + "\"," 38 " \"name\": \"" + name + "\","
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 "chrome-extension://*/")); 106 "chrome-extension://*/"));
107 107
108 std::string error_message; 108 std::string error_message;
109 scoped_ptr<NativeMessagingHostManifest> manifest = 109 scoped_ptr<NativeMessagingHostManifest> manifest =
110 NativeMessagingHostManifest::Load(manifest_path_, &error_message); 110 NativeMessagingHostManifest::Load(manifest_path_, &error_message);
111 ASSERT_FALSE(manifest); 111 ASSERT_FALSE(manifest);
112 EXPECT_FALSE(error_message.empty()); 112 EXPECT_FALSE(error_message.empty());
113 } 113 }
114 114
115 } // namespace extensions 115 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698