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

Unified Diff: third_party/WebKit/Source/core/testing/v8/WebCoreTestSupport.cpp

Issue 2340323002: Add Origin Trials Test interface, rather than attaching trials directly to internals. (Closed)
Patch Set: Updates Created 4 years, 3 months 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 | « third_party/WebKit/Source/core/testing/WorkerInternals.idl ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/testing/v8/WebCoreTestSupport.cpp
diff --git a/third_party/WebKit/Source/core/testing/v8/WebCoreTestSupport.cpp b/third_party/WebKit/Source/core/testing/v8/WebCoreTestSupport.cpp
index d1ba7f994acd434abe9e6dba68d03ed2ecb79ad5..6b6a8c15d57546b7a93686650ac5a7c187a83640 100644
--- a/third_party/WebKit/Source/core/testing/v8/WebCoreTestSupport.cpp
+++ b/third_party/WebKit/Source/core/testing/v8/WebCoreTestSupport.cpp
@@ -27,8 +27,7 @@
#include "bindings/core/v8/DOMWrapperWorld.h"
#include "bindings/core/v8/V8Binding.h"
-#include "bindings/core/v8/V8Internals.h"
-#include "bindings/core/v8/V8WorkerInternals.h"
+#include "bindings/core/v8/V8OriginTrialsTest.h"
#include "core/dom/Document.h"
#include "core/dom/ExecutionContext.h"
#include "core/frame/LocalFrame.h"
@@ -103,10 +102,7 @@ void installOriginTrialsForTests(ScriptState* scriptState)
v8::Local<v8::String> internalsName = v8::String::NewFromOneByte(isolate, reinterpret_cast<const uint8_t*>("internals"), v8::NewStringType::kNormal).ToLocalChecked();
v8::Local<v8::Value> v8Internals = global->Get(context, internalsName).ToLocalChecked();
if (v8Internals->IsObject()) {
- if (executionContext->isDocument())
- V8Internals::installOriginTrialsSampleAPI(scriptState);
- else if (executionContext->isWorkerGlobalScope())
- V8WorkerInternals::installOriginTrialsSampleAPI(scriptState);
+ V8OriginTrialsTest::installOriginTrialsSampleAPI(scriptState);
originTrialContext->setFeatureBindingsInstalled("Frobulate");
}
}
« no previous file with comments | « third_party/WebKit/Source/core/testing/WorkerInternals.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698