Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Unified Diff: test/test262/harness-adapt.js

Issue 2595403002: test262 roll (Closed)
Patch Set: Rebase Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « DEPS ('k') | test/test262/test262.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/test262/harness-adapt.js
diff --git a/test/test262/harness-adapt.js b/test/test262/harness-adapt.js
index d93d7e16109713090d92c011e8c31f5e7031770e..35d6f63ac63f5d65798d62494013f3a1aa6e134e 100644
--- a/test/test262/harness-adapt.js
+++ b/test/test262/harness-adapt.js
@@ -90,6 +90,18 @@ function $DONE(arg){
quit(0);
};
-var $ = {
- evalScript(script) { return Realm.eval(Realm.current(), script); }
-};
+function RealmOperators(realm) {
+ let $ = {
+ evalScript(script) {
+ return Realm.eval(realm, script);
+ },
+ createRealm() {
+ return RealmOperators(Realm.createAllowCrossRealmAccess());
+ },
+ global: Realm.eval(realm, 'this')
+ };
+ $.global.$ = $;
+ return $;
+}
+
+var $ = RealmOperators(Realm.current());
« no previous file with comments | « DEPS ('k') | test/test262/test262.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698