Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: test/BaseJsTest.h

Issue 29371607: Issue #3593 - Make isolate a fully internal member of the engine
Left Patch Set: Created Jan. 12, 2017, 2:46 p.m.
Right Patch Set: improve unit tests to go with isolate change Created Jan. 16, 2017, 3:53 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « test/AppInfoJsObject.cpp ('k') | test/BaseJsTest.cpp » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
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
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
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
LEFTRIGHT

Powered by Google App Engine
This is Rietveld