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

Unified Diff: test/GlobalJsObject.cpp

Issue 29536739: Noissue - Cleanup. Remove last remnants of old thread code.
Patch Set: Created Sept. 5, 2017, 7:36 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 | « test/FilterEngine.cpp ('k') | test/Notification.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
@@ -16,7 +16,6 @@
*/
#include "BaseJsTest.h"
-#include "../src/Thread.h"
namespace
{
@@ -36,7 +35,7 @@
{
GetJsEngine().Evaluate("let foo; setTimeout(function() {foo = 'bar';}, 100)");
ASSERT_TRUE(GetJsEngine().Evaluate("foo").IsUndefined());
- AdblockPlus::Sleep(200);
+ std::this_thread::sleep_for(std::chrono::milliseconds(200));
ASSERT_EQ("bar", GetJsEngine().Evaluate("foo").AsString());
}
@@ -44,7 +43,7 @@
{
GetJsEngine().Evaluate("let foo; setTimeout(function(s) {foo = s;}, 100, 'foobar')");
ASSERT_TRUE(GetJsEngine().Evaluate("foo").IsUndefined());
- AdblockPlus::Sleep(200);
+ std::this_thread::sleep_for(std::chrono::milliseconds(200));
ASSERT_EQ("foobar", GetJsEngine().Evaluate("foo").AsString());
}
@@ -59,6 +58,6 @@
GetJsEngine().Evaluate("let foo = []");
GetJsEngine().Evaluate("setTimeout(function(s) {foo.push('1');}, 100)");
GetJsEngine().Evaluate("setTimeout(function(s) {foo.push('2');}, 150)");
- AdblockPlus::Sleep(200);
+ std::this_thread::sleep_for(std::chrono::milliseconds(200));
ASSERT_EQ("1,2", GetJsEngine().Evaluate("foo").AsString());
-}
+}
« no previous file with comments | « test/FilterEngine.cpp ('k') | test/Notification.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld