| OLD | NEW |
| 1 /* | 1 /* |
| 2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
| 3 * Copyright (C) 2006-2016 Eyeo GmbH | 3 * Copyright (C) 2006-2016 Eyeo GmbH |
| 4 * | 4 * |
| 5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
| 6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
| 7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
| 8 * | 8 * |
| 9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 class LazyFileSystem : public AdblockPlus::FileSystem | 82 class LazyFileSystem : public AdblockPlus::FileSystem |
| 83 { | 83 { |
| 84 public: | 84 public: |
| 85 std::shared_ptr<std::istream> Read(const std::string& path) const | 85 std::shared_ptr<std::istream> Read(const std::string& path) const |
| 86 { | 86 { |
| 87 std::string dummyData(""); | 87 std::string dummyData(""); |
| 88 if (path == "patterns.ini") | 88 if (path == "patterns.ini") |
| 89 dummyData = "# Adblock Plus preferences\n[Subscription]\nurl=~fl~"; | 89 dummyData = "# Adblock Plus preferences\n[Subscription]\nurl=~fl~"; |
| 90 else if (path == "prefs.json") | 90 else if (path == "prefs.json") |
| 91 dummyData = "{}"; | 91 dummyData = "{}"; |
| 92 return std::shared_ptr<std::istream>(new std::istringstream(dummyData)); | 92 return std::make_shared<std::istringstream>(dummyData); |
| 93 } | 93 } |
| 94 | 94 |
| 95 void Write(const std::string& path, std::shared_ptr<std::istream> content) | 95 void Write(const std::string& path, std::shared_ptr<std::istream> content) |
| 96 { | 96 { |
| 97 } | 97 } |
| 98 | 98 |
| 99 void Move(const std::string& fromPath, const std::string& toPath) | 99 void Move(const std::string& fromPath, const std::string& toPath) |
| 100 { | 100 { |
| 101 } | 101 } |
| 102 | 102 |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 | 179 |
| 180 class BaseJsTest : public ::testing::Test | 180 class BaseJsTest : public ::testing::Test |
| 181 { | 181 { |
| 182 protected: | 182 protected: |
| 183 AdblockPlus::JsEnginePtr jsEngine; | 183 AdblockPlus::JsEnginePtr jsEngine; |
| 184 virtual void SetUp(); | 184 virtual void SetUp(); |
| 185 virtual void TearDown(); | 185 virtual void TearDown(); |
| 186 }; | 186 }; |
| 187 | 187 |
| 188 #endif | 188 #endif |
| OLD | NEW |