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

Unified Diff: test/GlobalJsObject.cpp

Issue 10184021: Some refactoring of global JavaScript objects (Closed)
Patch Set: Unbitrotted patch Created April 16, 2013, 3:32 p.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 | « src/WebRequestJsObject.cpp ('k') | test/JsEngine.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/GlobalJsObject.cpp
===================================================================
--- a/test/GlobalJsObject.cpp
+++ b/test/GlobalJsObject.cpp
@@ -21,17 +21,16 @@ TEST(GlobalJsObjectTest, SetTimeoutWithA
ASSERT_EQ("foobar", jsEngine.Evaluate("this.foo")->AsString());
}
TEST(GlobalJsObjectTest, SetTimeoutWithInvalidArgs)
{
AdblockPlus::JsEngine jsEngine(0, 0, 0);
ASSERT_ANY_THROW(jsEngine.Evaluate("setTimeout()"));
ASSERT_ANY_THROW(jsEngine.Evaluate("setTimeout('', 1)"));
- ASSERT_ANY_THROW(jsEngine.Evaluate("setTimeout(function(){}, '')"));
}
TEST(GlobalJsObjectTest, SetMultipleTimeouts)
{
AdblockPlus::JsEngine jsEngine(0, 0, 0);
jsEngine.Evaluate("foo = []");
jsEngine.Evaluate("setTimeout(function(s) {foo.push('1');}, 100)");
jsEngine.Evaluate("setTimeout(function(s) {foo.push('2');}, 150)");
« no previous file with comments | « src/WebRequestJsObject.cpp ('k') | test/JsEngine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld