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

Unified Diff: test/FileSystemJsObject.cpp

Issue 10488022: Added Android build target (Closed)
Patch Set: Review comments addressed Created May 24, 2013, 8:40 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/DefaultFileSystem.cpp ('k') | third_party/v8_gyp_launcher » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/FileSystemJsObject.cpp
===================================================================
--- a/test/FileSystemJsObject.cpp
+++ b/test/FileSystemJsObject.cpp
@@ -10,19 +10,19 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <sstream>
#include "BaseJsTest.h"
#include "../src/Thread.h"
-#include "../src/Utils.h"
namespace
{
class MockFileSystem : public AdblockPlus::FileSystem
{
public:
bool success;
std::string contentToRead;
@@ -50,17 +50,20 @@ namespace
return std::tr1::shared_ptr<std::istream>(stream);
}
void Write(const std::string& path, std::tr1::shared_ptr<std::ostream> data)
{
if (!success)
throw std::runtime_error("Unable to write to " + path);
lastWrittenPath = path;
- lastWrittenContent = AdblockPlus::Utils::Slurp(*data);
+
+ std::stringstream content;
+ content << data->rdbuf();
+ lastWrittenContent = content.str();
}
void Move(const std::string& fromPath, const std::string& toPath)
{
if (!success)
throw std::runtime_error("Unable to move " + fromPath + " to "
+ toPath);
movedFrom = fromPath;
« no previous file with comments | « test/DefaultFileSystem.cpp ('k') | third_party/v8_gyp_launcher » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld