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

Side by Side Diff: test/JsEngine.cpp

Issue 10184021: Some refactoring of global JavaScript objects (Closed)
Patch Set: Unbitrotted patch Created April 16, 2013, 3:32 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/GlobalJsObject.cpp ('k') | test/JsValue.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #include <AdblockPlus.h> 1 #include <AdblockPlus.h>
2 #include <fstream> 2 #include <fstream>
3 #include <gtest/gtest.h> 3 #include <gtest/gtest.h>
4 #include <sstream> 4 #include <sstream>
5 5
6 class BaseFileSystem : public AdblockPlus::FileSystem 6 class BaseFileSystem : public AdblockPlus::FileSystem
7 { 7 {
8 void Write(const std::string& path, 8 void Write(const std::string& path,
9 std::tr1::shared_ptr<std::ostream> content) 9 std::tr1::shared_ptr<std::ostream> content)
10 { 10 {
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 ASSERT_TRUE(value->IsString()); 118 ASSERT_TRUE(value->IsString());
119 ASSERT_EQ("foo", value->AsString()); 119 ASSERT_EQ("foo", value->AsString());
120 120
121 value = jsEngine.NewValue(12); 121 value = jsEngine.NewValue(12);
122 ASSERT_TRUE(value->IsNumber()); 122 ASSERT_TRUE(value->IsNumber());
123 ASSERT_EQ(12, value->AsInt()); 123 ASSERT_EQ(12, value->AsInt());
124 124
125 value = jsEngine.NewValue(true); 125 value = jsEngine.NewValue(true);
126 ASSERT_TRUE(value->IsBool()); 126 ASSERT_TRUE(value->IsBool());
127 ASSERT_TRUE(value->AsBool()); 127 ASSERT_TRUE(value->AsBool());
128
129 value = jsEngine.NewObject();
130 ASSERT_TRUE(value->IsObject());
131 ASSERT_EQ(0u, value->GetOwnPropertyNames().size());
128 } 132 }
OLDNEW
« no previous file with comments | « test/GlobalJsObject.cpp ('k') | test/JsValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld