Index: test/GlobalJsObject.cpp |
=================================================================== |
--- a/test/GlobalJsObject.cpp |
+++ b/test/GlobalJsObject.cpp |
@@ -16,7 +16,6 @@ |
*/ |
#include "BaseJsTest.h" |
-#include "../src/Thread.h" |
namespace |
{ |
@@ -29,7 +28,7 @@ |
{ |
jsEngine->Evaluate("setTimeout(function() {foo = 'bar';}, 100)"); |
ASSERT_TRUE(jsEngine->Evaluate("this.foo")->IsUndefined()); |
- AdblockPlus::Sleep(200); |
+ std::this_thread::sleep_for(std::chrono::milliseconds(200)); |
ASSERT_EQ("bar", jsEngine->Evaluate("this.foo")->AsString()); |
} |
@@ -37,7 +36,7 @@ |
{ |
jsEngine->Evaluate("setTimeout(function(s) {foo = s;}, 100, 'foobar')"); |
ASSERT_TRUE(jsEngine->Evaluate("this.foo")->IsUndefined()); |
- AdblockPlus::Sleep(200); |
+ std::this_thread::sleep_for(std::chrono::milliseconds(200)); |
ASSERT_EQ("foobar", jsEngine->Evaluate("this.foo")->AsString()); |
} |
@@ -52,6 +51,6 @@ |
jsEngine->Evaluate("foo = []"); |
jsEngine->Evaluate("setTimeout(function(s) {foo.push('1');}, 100)"); |
jsEngine->Evaluate("setTimeout(function(s) {foo.push('2');}, 150)"); |
- AdblockPlus::Sleep(200); |
+ std::this_thread::sleep_for(std::chrono::milliseconds(200)); |
ASSERT_EQ("1,2", jsEngine->Evaluate("this.foo")->AsString()); |
} |