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

Delta Between Two Patch Sets: test/AppInfoJsObject.cpp

Issue 10198022: Pass application data into libadblockplus (Closed)
Left Patch Set: Created April 12, 2013, 1:23 p.m.
Right Patch Set: Merged upstream, addressed issues, renamed AppInfo fields Created April 17, 2013, 2:47 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
LEFTRIGHT
1 #include <AdblockPlus.h> 1 #include <AdblockPlus.h>
2 #include <gtest/gtest.h> 2 #include <gtest/gtest.h>
3 3
4 TEST(AppInfoJsObjectTest, AllProperties) 4 TEST(AppInfoJsObjectTest, AllProperties)
5 { 5 {
6 AdblockPlus::AppInfo appInfo; 6 AdblockPlus::AppInfo appInfo;
7 appInfo.addonId = "1"; 7 appInfo.id = "1";
8 appInfo.addonVersion = "2"; 8 appInfo.version = "2";
9 appInfo.addonRoot = "3"; 9 appInfo.name = "4";
10 appInfo.addonName = "4"; 10 appInfo.platform = "5";
11 appInfo.application = "5";
12 AdblockPlus::JsEngine jsEngine(appInfo, 0, 0, 0); 11 AdblockPlus::JsEngine jsEngine(appInfo, 0, 0, 0);
13 ASSERT_EQ("1", jsEngine.Evaluate("_appInfo.addonID")); 12 ASSERT_EQ("1", jsEngine.Evaluate("_appInfo.id")->AsString());
14 ASSERT_EQ("2", jsEngine.Evaluate("_appInfo.addonVersion")); 13 ASSERT_EQ("2", jsEngine.Evaluate("_appInfo.version")->AsString());
15 ASSERT_EQ("3", jsEngine.Evaluate("_appInfo.addonRoot")); 14 ASSERT_EQ("4", jsEngine.Evaluate("_appInfo.name")->AsString());
16 ASSERT_EQ("4", jsEngine.Evaluate("_appInfo.addonName")); 15 ASSERT_EQ("5", jsEngine.Evaluate("_appInfo.platform")->AsString());
17 ASSERT_EQ("5", jsEngine.Evaluate("_appInfo.application"));
18 } 16 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld