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

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: IDL-backed methods are not static on full interfaces 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
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");
chasej 2016/09/16 15:17:02 No longer using "Frobulate" in the naming of the I
iclelland 2016/09/16 15:59:47 Can I do that as a separate CL? It will involve re
chasej 2016/09/16 18:23:44 Yes, definitely can wait for a separate CL. I forg
}
}

Powered by Google App Engine
This is Rietveld 408576698